[thelist] 301 redirects in htaccess

Hassan Schroeder hassan.schroeder at gmail.com
Sat Aug 4 08:56:40 CDT 2012


On Sat, Aug 4, 2012 at 5:51 AM, John Allsopp <john at johnallsopp.co.uk> wrote:

>   RewriteRule blogViewer(.*)$  oldSite/blogViewer$1 [R,L]

> I think it's giving a 302 where I think I want a 301 .. so how do I do that?

Tsk, tsk - I "think"? Easy to be sure what it's returning:

wget --spider --server-response
http://www.johnallsopp.co.uk/blogViewer.php?blog=2012

OK, so a look at
http://httpd.apache.org/docs/2.4/mod/mod_rewrite.html#rewriterule
suggests changing your rule above to:

RewriteRule blogViewer(.*)$  oldSite/blogViewer$1 [R=301,L]

Untested, but HTH,
-- 
Hassan Schroeder ------------------------ hassan.schroeder at gmail.com
http://about.me/hassanschroeder
twitter: @hassan


More information about the thelist mailing list