For www.domain.com/area/north
I can use:
RewriteRule area\/([0-9a-zA-Z_\&\-\ \.\/]+)$ home.php?areasearch=$1 [QSA,L]
to grab ‘north’ and pass it as a parameter to my home page
But now my url is more like:
www.domain.com/area/north/home.php?currentshow=listing…
I can’t work out how to get at the ‘north’ bit without all the stuff afterwards
something like:
RewriteRule area\/([0-9a-zA-Z_\&\-\ \.\/]+)$\/([0-9a-zA-Z_\&\-\ \.\/]+)$ home.php?areasearch=$1 [QSA,L]
??
I know it should be simple, but I just can’t get it to work!
Any help appreciated!
Hi,Your requirements are a little unclear.Do you want [noparse]www.domain.com/home.php?areasearch=north[/noparse] with [noparse]www.domain.com/area/north[/noparse]
Sorry, been looking at this again - I think my logic was all back to front
I can just extract the bit I need from $_SERVER[‘REQUEST_URI’] and use that.
Good glad to hear that you found something that suits your needs.