If you want to set up a temporary redirect to help your pages rank better in search engines, you should set up a 302 Server Redirect. But you don't need server programming to set one up, just a simple text file on your Apache Web server.
- If you don't have a .htaccess file in your root directory, open a new text file. If you do have one there, open it for editing.
- At the bottom of the file, add the line:
Redirect 302 /PATH_TO_REDIRECT NEW_LOCATION_URI
- Change "/PATH_TO_REDIRECT" to the directory path on your Web server you want redirected.
- Change "NEW_LOCATION_URI" to the URL path you want the pages redirected to.
- Save your .htaccess file and upload it to the root of your Web server.
- Test your redirect by going to the old path in a Web browser. You should be taken automatically to the new path.
- You should only use 302 redirects to set up temporary redirects, such as to clean up ugly URLs.
- If you want the URL to change in the search engine, use a 301 redirect.
What You Need