Forum Moderators: phranque

Message Too Old, No Replies

301 Redirect Help

how to redirect links with URL parameters

         

devitnow

4:12 pm on Jan 2, 2005 (gmt 0)

10+ Year Member



Hi Everyone,

I need to create a couple 301 Redirects for links with url parameters like /details.php?id=45

My redirect command looks like this, but it doesn't work:

redirect 301 /details.php?id=45 [mydomain.com...]

I know redirects are working on the server because I can do simple redirects but I can't get this to work with a more complicated link.

What am I doing wrong?

thanks

jdMorgan

4:22 pm on Jan 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can't use mod_alias to redirect URLs with attached query strings. Use mod_rewrite, and use RewriteCond to test and back-reference the query string.

See this recent thread [webmasterworld.com].

Jim