LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Apache Migration/Compatibility (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=24)
-   -   Redirect permanent (http://www.litespeedtech.com/support/forum/showthread.php?t=1008)

pythod 04-27-2007 03:26 PM

Redirect permanent
 
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

Quote:

Originally Posted by pythod (Post 4834)
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

Code:

Redirect permanent /webmail/    http://mail.server.com/webmail/
Redirect permanent /Books/  http://www.server.com/books/



All times are GMT -7. The time now is 12:24 AM.