Oh how the months go by when your having fun, working hard, and being a manager…
ahhh
Anyway I had to fix this issue recently when one of the software engineers on the top-secret project I can’t talk about hit a problem,
Basically the htaccess documentation is a bit naff
see these links
which clearly states that the query string isn’t passed through to rewriterule …. ah yes really obvious… but after 2-3 mins of inspection it was obvious this was the correct place to check query string parameters which are stripped and put into a parameter
the core function of the standard apache htaccess file
So the basic query string modifications are done as follows
Stage 1 – isolate information in the query string using the power of regex
# so say your query string is ?cat=hello
# this should make the variable %1 equal to hello
RewriteCond %{QUERY_STRING} ^cat=(.*)$
Stage 2 – add this query string information into the rewrite
# so say your query string is ?cat=hello
# this should make the variable %1 equal to hello
RewriteCond %{QUERY_STRING} ^cat=(.*)$
# this should take the person to http://www.bbc.co.uk/hello/
RewriteRule .* http://www.bbc.co.uk/%1/
See example
(content of the .htaccess file)
hope this helps someone as i know it confused the hell out of the poor SE, also note the final htacces was rather alot more complex, than the wee sample above,
cheers
Zap
(while I’m here I’d like to apolognise to the poor author of sifr who i cornered in a pub recently and shouted at a bit, sorry i’ve been hanging out with a html/css crowd recently and they really don’t like what you’ve done to them, something about designers bullying them, like i was saying soooorrrrie…)