Forum Moderators: phranque

Message Too Old, No Replies

.htaccess

IS this how to do a 301??

         

hurlimann

9:27 am on May 18, 2002 (gmt 0)

10+ Year Member



I need a 301 placed in the root. The host has replied. Is this right?:

I placed the redirect in your .htaccess, but did not activate the .htaccess. I want to run this by you to make sure it is what you want:Redirect 301 / [xxxxx...]

nwilson

9:51 am on May 18, 2002 (gmt 0)



What's a 301? I use .htaccess to redirect 404's like this:

ErrorDocument 404 /general/oops.html

But what he's done looks right....

hurlimann

9:57 am on May 18, 2002 (gmt 0)

10+ Year Member



301 is a premanant redirect.

bobriggs

10:47 am on May 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That is correct as far as it goes. Assuming you're trying to redirect to another host, (xxxxx), you'll want to add a trailing slash, otherwise there will be a second redirect:

redirect permanent / [xxxxx...]

Permanent and 301 are the same: Apache mod_alias [httpd.apache.org]

nwilson

12:05 pm on May 18, 2002 (gmt 0)



Nice, I have to redirect a clients old site to new and was going to use http headers but that looks even easier!

Nick