Jump to content


Photo

can htaccess see a query string?


  • Please log in to reply
1 reply to this topic

#1 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 01 July 2006 - 05:58 PM

I've been banging my head agains this for months -- I think I even posted it here before.

How do I get htaccess to pass the entire query string along with whatever else it passes?

so, if someone requests this.html?id=1&more=2 it will redirect them to index.php?page=this&id=1&more=2

is it possible?

#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 01 July 2006 - 06:31 PM

ahhh... here we go:

RewriteRule ^(.+)\.html$ index.php?page=$1 [QSA,L]
The magic is the [QSA] part.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users