httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron W Morris <aaronmor...@mindspring.com>
Subject Re: [users@httpd] 301 Redirect maintain query string
Date Mon, 21 Jun 2004 19:38:14 GMT
John Nichel wrote:

> Hi,
> 
>   I am trying to do a 301 redirect for some old static pages which are 
> now done in php.  Sometimes, links from other sites will contain a query 
> string (eg. http://blah/blah/page.html?foo=bar).  I need to be able to 
> include that query string in the redirect if it exists, but I can't seem 
> to figure this out.  In a .htaccess file, I have this...
> 
> RedirectMatch 301 /blah/page.html(.*)$ http://new/page.php?$1
> 
> And the 301 will send page.html to the new page.php, but it's not 
> including the query string.  How can I make this work?  TIA.
> 

Redirect permanent /blah/page.html http://new/page.php

I just tested it and it works.

-- 
Aaron W Morris <aaronmorris@mindspring.com> (decep)



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message