treacle0996 — 2013-02-05T14:37:20-05:00 — #1
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:
I can't work out how to get at the 'north' bit without all the stuff afterwards
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!
serverstorm — 2013-02-06T00:29:38-05:00 — #2
Hi,Your requirements are a little unclear.Do you want www.domain.com/home.php?areasearch=north with www.domain.com/area/north
treacle0996 — 2013-02-06T05:14:42-05:00 — #3
treacle0996 — 2013-02-06T07:51:29-05:00 — #4
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['REQUESTURI'] and use that.
serverstorm — 2013-02-06T09:47:00-05:00 — #5
Good glad to hear that you found something that suits your needs.