Share » Forums » General » where can i use redirect!

where can i use redirect!

where can i use redirect!

Thursday 14 October 2004 5:38:06 am - 1 reply

Author Message

Alex Jones

Thursday 14 October 2004 6:53:32 am

Hi, I think you would be better off using an .htaccess file for this - assuming you are using Apache. To do this, follow these steps:

1. In a text editor create a file named .htaccess (the dot is important)
2. Add this line to the file:

redirect 301 / /test/ 

3. Save the file, and upload it to the root directory on the site

The reason, I recommend this method is that it will ensure search engines know that the site has been moved, and it is transparent to the user, whereas a meta refresh can be stored in the browser's history, frustrating the user if they try to use their browser's back button. They click on the back arrow, which takes them to the page with the meta refresh, which automatically sends them back to the page they were on - an annoying loop.

One quick note, you may need to tell your operating system, and/or your HTML editors may not show you the .htaccess file once it is created, as the dot at the beginning indicates that it is supposed to be a hidden file. So, you may need to change some settings to make sure that you can see it.

<b>Additional Info:</b> See 'Strategy 2' on http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

Hope this helps. If not, let me know.

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu