PDA

View Full Version : Redirecting url with query string to home page


Daniellez
08-25-2009, 04:55 AM
How would I redirect a url similar to the one below to the home page?

http://www.mydomain.com/pages.php?page=

I've seen some methods for directing specific urls but I need anything that is after page= to redirect. With a wild card expression maybe? I'm lost :D

abduraooft
08-25-2009, 06:44 AM
You could write RewriteCond on the basis of QUERY_STRING, see http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html#check-for-key-in-query-string

Daniellez
08-25-2009, 07:07 AM
That's using a directory (logged-in). I tried adding pages.php..doesn't work. What am I doing wrong?

seco
08-25-2009, 07:59 AM
you might be thinking about Case Switches