LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Rewrite Rule Problem

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2008, 09:43 AM
zoom zoom is offline
Senior Member
 
Join Date: Nov 2005
Posts: 92
Default Rewrite Rule Problem

I'm not sure if this is a LiteSpeed issue or not. I'm trying to redirect to a SSL URL if the initial request is not using HTTPS and the REQUEST_URI is /admin.php. If I use the following rewrite ruleset (see below) it seems to redirect to the first SSL site I have in my SSL template list.

However, if I check for any other page the redirect works perfect. Any reason why it doesn't like admin.php??? Does the rule look fine?

This ruleset doesn't work????
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(admin\.php)$ https://www.mydomain.com/$1 [R=301,L]

This ruleset works perfect.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(about\.php)$ https://www.mydomain.com/$1 [R=301,L]
Reply With Quote
  #2  
Old 08-12-2008, 09:46 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Maybe it your browser cache. clear the cache and try again.
Reply With Quote
  #3  
Old 08-12-2008, 12:41 PM
zoom zoom is offline
Senior Member
 
Join Date: Nov 2005
Posts: 92
mistwang,
Thanks for the reply. The problem was a mistake in the template configuration. It seems that somebody put an Apache Redirect directive for admin.php within the template. Which explains why the rewrite rule was failing to redirect correctly.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:19 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.