Forum Moderators: phranque
RewriteRule ^home_(([a-z]¦[-])+)$ index.php?pages=home&theme=$1
RewriteRule ^services_(([a-z]¦[-])+)$ index.php?pages=services&theme=$1
RewriteRule ^recent-work_(([a-z]¦[-])+)$ index.php?pages=recent-work&theme=$1
RewriteRule ^vision_(([a-z]¦[-])+)$ index.php?pages=vision&theme=$1
RewriteRule ^contact_(([a-z]¦[-])+)$ index.php?pages=contact&theme=$1
RewriteRule ^t-and-c_(([a-z]¦[-])+)$ index.php?pages=t-and-c&theme=$1
RewriteRule ^site-map_(([a-z]¦[-])+)$ index.php?pages=site-map&theme=$1
and am trying to cut it down to one line but can't work out how. Any ideas? (the above code works well also) What I think should work is something like this:
RewriteRule ^(([a-z]¦[-])+)_(([a-z]¦[-])+)$ index.php?pages=$1&theme=$2
But it doesn't and I'm no expert at this. Does it have anything to do with the '_' character separating the 2 expressions? If so what would be a valid substitute? When I have tried the above code and I echo $_GET["theme"], very bizarrely it only echos the last letter of the string stored in $_GET["pages"]? No idea why and now I have to go to bed.
Thanks for your time,
R