Forum Moderators: phranque

Message Too Old, No Replies

301 Permananet Redirect in .htaccess

         

hdcinc

5:58 pm on Nov 8, 2003 (gmt 0)

10+ Year Member



If I am moving files from one place to another on the same website/domain, which is the proper format to add a 301 to the .htaccess file?

A.) Redirect 301 oldpage.htm http://www.example.com/newpage.htm

or

B.) Redirect 301 oldpage.htm newpage.htm

In other words, if dealing with same domain, do you have to include domain name or not and is formating for both examples correct?

Thanks :)

[edited by: jdMorgan at 11:03 pm (utc) on Nov. 8, 2003]
[edit reason] Examplified, delinked URLs [/edit]

Mohamed_E

8:42 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The first one, i.e. full URL of newlocation.

jdMorgan

11:04 pm on Nov 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



C.) Redirect 301 /oldpage.htm http://www.example.com/newpage.htm

Apache Redirect directive documentation [httpd.apache.org]

Jim