LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   General (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=25)
-   -   Rewrite problem (http://www.litespeedtech.com/support/forum/showthread.php?t=2868)

felosi 04-15-2009 12:12 AM

Rewrite problem
 
Continued from email correspondence.

I tried to add the rwrite log level to httpd.conf as well as log file but neither seems to be working.

I added this in httpd.conf between the VirtualHost directives

RewriteLogLevel 9
RewriteLog /etc/httpd/logs/rw.log


The rewrite rules in question again are:
Code:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/?(.+)_(en-us|en|es|pt|de|fr|jp|it)?\.(html|htm|php$
RewriteRule ^(/)?.+ $1%1.%3?lang=%2&%{QUERY_STRING} [L]

RewriteCond %{REQUEST_URI} ^/?(en-us|en|es|pt|de|fr|jp|it)?\.(html|htm|php)$
RewriteRule ^(/)?.+ $1?lang=%1&%{QUERY_STRING} [L]

RewriteCond %{REQUEST_URI} ^/?(buy|order)_.+\.html$
RewriteRule ^(/)?buy_(.+)\.html $1?product=$2&%{QUERY_STRING} [L]
RewriteRule ^(/)?order_(.+)\.html $1?category=$2&%{QUERY_STRING} [L]

AddType application/x-httpd-php .php .htm
DirectoryIndex index.php index.htm

It doesnt work, just gives off 404 errors.

Well I think I got log issue fixed, had log level for main log wrong

Here are some errors I seen in regular log

2009-04-15 00:18:13.430 [INFO] [84.110.34.83:1419-0#APVH_indianpharmaonline.warrensdrugstore.com] [REWRITE] Rule: Match '' with pattern '^(/)?.+', result: -1
2009-04-15 00:18:13.430 [INFO] [84.110.34.83:1419-0#APVH_indianpharmaonline.warrensdrugstore.com] [REWRITE] Rule: Match '' with pattern '^(/)?.+', result: -1
2009-04-15 00:18:13.431 [INFO] [84.110.34.83:1419-0#APVH_indianpharmaonline.warrensdrugstore.com] [REWRITE] Rule: Match '' with pattern '^(/)?buy_(.+)\.html', result: -1
2009-04-15 00:18:13.431 [INFO] [84.110.34.83:1419-0#APVH_indianpharmaonline.warrensdrugstore.com] [REWRITE] Rule: Match '' with pattern '^(/)?order_(.+)\.html', result: -1

felosi 04-15-2009 01:47 PM

Well we have tried everything. That error still showing in logs. Me and the client have no clue what we can do. Any help would be much appreciated

mistwang 04-16-2009 07:30 AM

Those rules does match an empty string "", the URL is an empty string when rewrite base was chopped off.
URL "/" will become "" since rewrite base is "/".


All times are GMT -7. The time now is 02:36 AM.