.htaccess 301 redirect without GET var

Posted by tvgemert on Stack Overflow See other posts from Stack Overflow or by tvgemert
Published on 2010-03-16T14:48:52Z Indexed on 2010/03/16 14:51 UTC
Read the original article Hit count: 605

Filed under:
|
|

Hi,

For a website I'm currently working on we're redirecting our old URL's permanently to new ones like this: Redirect 301 /oldfile.php http://www.site.com/show/newurl

Now I come across this situation in which the old url has a get var like: Redirect 301 /oldfile.php?var=name http://www.site.com/show/newurl

This will redirect the oldfile to the new url plus it adds the get var so it redirects to: http://www.site.com/show/newurl?var=name

How would I set up this redirect without the get var?

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about 301-redirect