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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Rewrite problem

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-15-2009, 12:12 AM
felosi felosi is offline
Senior Member
 
Join Date: Jun 2007
Posts: 249
Default 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

Last edited by felosi; 04-15-2009 at 12:19 AM..
Reply With Quote
 

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 05:34 PM.



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