Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is my .htaccess file correct?

Status
Not open for further replies.

leonk09

Technical User
Nov 9, 2005
20
GB
I have recently changed domains, and I want to make sure that my .htaccess file is correctly setup.

I currenlty have PR2, which has just changed in the update. Sometimes it carries on to my new page, and sometimes it doesnt. I am not sure if this is to do with my .htaccess file, or the fact that the google update hasn't quite completed.

Here's what I have at the moment


Code:
redirect 301 / [URL unfurl="true"]http://www.mynewsite.com/[/URL]
Or should it be


Code:
redirect 301 /index.html [URL unfurl="true"]http://www.mynewsite.com/[/URL]
Or even

Code:
redirect 301 [URL unfurl="true"]http://www.myoldsite.com/[/URL] [URL unfurl="true"]http://www.mynewsite.com/[/URL]
Thanks a lot

Kestrel
 
leonk09,

The syntax of the redirect directive is well documented in the Apache docs.

The above link is for Apache 2.2, since you didn't specify a version, but the syntax is the same for version 1.2+.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top