[Web4lib] 301 Redirects

Andrew Stevens asteven4 at gmu.edu
Wed Sep 6 14:51:29 EDT 2006


Rachel Vidrine wrote:

> I want to redirect this page:
> 
> http://www.waketech.edu/library/hsl/hslpage.html 
> 
> to...
> 
> http://www.waketech.edu/library/hsl/index.html 
> 
> I found that there is already a .htaccess file in the root directory,
> so I simply added this line to the code that was already there:
> 
> redirect 301 /hsl/hslpage.html
> http://www.waketech.edu/library/hsl/index.html 
> 
> Then I uploaded the new .htaccess file to the root directory. When I
> accessed the first URL above, nothing happened.
> 
> Am I doing something wrong? Is it possible there is some configuration
> on the server (which I don't have access to) that is preventing the
> redirect from working?

Your basic syntax is correct, although you might want to change 
"/hsl/hslpage.html" to "/library/hsl/hslpage.html"

You'll have to make sure that mod_alias is installed on your server and 
that AllowOverride is allowed for the directory housing your htaccess file.

You can find some basic documentation for apache's mod_alias at:
http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect

Documentation for the AllowOverride directive is at:
http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride

Hope this helps you with your problem.

--
Andrew Stevens
Web Services Librarian
George Mason University





More information about the Web4lib mailing list