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

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > mod rewrite not working in LiteSpeed

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2011, 12:21 PM
Ness3k Ness3k is offline
New Member
 
Join Date: May 2011
Posts: 1
Default mod rewrite not working in LiteSpeed

The rewrite in the .htaccess file worked on the old Apache server, but is not working in the LiteSpeed server 4.0.20. I heard it was fully compatible with Apache. Below is the code...

Code:
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-l
 RewriteRule ^category/(.*) /$1?tab=category [P,L]
This code causes a 500 Internal Server Error. The error in the log goes like this...
[ERROR] [REWRITE] Absolute URL with leading 'http://' is required for proxy, URL: /aromatherapy.html

Thoughts as to why this would work in Apache and not in LiteSpeed?

Thanks.
Reply With Quote
  #2  
Old 05-24-2011, 02:45 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You should remove the [P] flag, it is for proxy, not sure what apache will do, but proxy to the same server is a bad idea anyway.
Reply With Quote
  #3  
Old 05-24-2011, 03:19 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,338
you need to create webserver external application and refer below for proxy rewrite usage.

https://store.litespeedtech.com/stor...yarticle&id=21

Proxy-Host
Modify proxy request "Host" header value, example:
web site domain name is "www.example.com", it proxy request to backend, backend is defined as a web server with name "node1", it requires domain name to be "node1.example.com", the rewrite rule should be
RewriteRule ^(.*)$ http://node1/$1 [P,E=Proxy-Host:node1.example.com]
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 04:43 AM.



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