View Full Version : Redirect permanent
pythod
04-27-2007, 03:26 PM
Why won't this work in .htaccess?
Redirect permanent ^/webmail/ http://mail.server.com/webmail/
Redirect permanent ^/Books/ http://www.server.com/books/
It has been working great since years in apache and now litespeed can't parse these lines :-(
mistwang
04-27-2007, 03:56 PM
You need to remove the leading "/" of the matching URL when use a rewrite rule in .htaccess. It is the RewriteBase in Apache. Your rewrite rules must be used in Apache httpd.conf before, not in .htaccess.
Please try,
Redirect permanent ^webmail/ http://mail.server.com/webmail/
Redirect permanent ^Books/ http://www.server.com/books/
pythod
04-27-2007, 05:39 PM
I ended up using this:
Redirectmatch 301 ^/webmail/ http://mail.server.com/webmail/
Redirectmatch 301 ^/Books/ http://www.server.com/books/
I will give your lines a try too...
mistwang
04-27-2007, 08:35 PM
I ended up using this:
Redirectmatch 301 ^/webmail/ http://mail.server.com/webmail/
Redirectmatch 301 ^/Books/ http://www.server.com/books/
I will give your lines a try too...
That works.
I was confused Redirect with "RewriteRule", the directives should be
Redirect permanent /webmail/ http://mail.server.com/webmail/
Redirect permanent /Books/ http://www.server.com/books/