[solved] rewriterule moving from apacha to litespeed

#1
Here is my .htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine on
Rewriterule ^busqueda/(.*)$ index.php?special=search&search=$1
Rewriterule ^index.html$ index.php
Rewriterule ^contacto.html$ index.php?special=contacto
Rewriterule ^sitemap.html$ index.php?special=sitemap
Rewriterule ^mapadelsitio.html$ index.php?special=sitemap
Rewriterule ^error-(.*).html$ index.php?special=error&error=$1
Rewriterule ^feed.xml$ feed.php

Rewriterule ^([0-9]+)-(.*)/$ index.php?category=$1
Rewriterule ^([0-9]+)-(.*)$ index.php?category=$1
Rewriterule ^ejemplos-(.*)/$ index.php?category2=$1
Rewriterule ^ejemplos-(.*)$ index.php?category2=$1
Rewriterule ^uploads/(.*)$ descargar.php?filename=$1
Rewriterule ^(.*)/([0-9]+)-(.*).html$ index.php?page=$2
Rewriterule ^tag/(.*)-([0-9]+).html$ index.php?tag=$1&tagpage=$2
Rewriterule ^tag/(.*).html$ index.php?tag=$1
</IfModule>

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
I noticed at least this line is not working

Rewriterule ^(.*)/([0-9]+)-(.*).html$ index.php?page=$2

Can anyone help me ?

Thanks a lot
 
Last edited by a moderator:

mistwang

LiteSpeed Staff
#2
Nothing special. you should add "RewriteLogLevel 9" directive in <vritualhost> section for this vhost, then check error_log, see if you can figure it out.
 

NiteWave

Administrator
#3
Code:
Rewriterule ^(.*)/([0-9]+)-(.*).html$ index.php?page=$2
best add [L] at end of the line.

e.g.,
Rewriterule ^(.*)/([0-9]+)-(.*).html$ index.php?page=$2 [L]

this applies to other rules -- add [L] if possible. this will improve the performance.
 

webizen

Well-Known Member
#5
There is no issue from our internal testing.
request to http://test/abc/999-456.html rewrite to /index.php?page=999 as shown below:
2011-04-12 17:57:01.758 [INFO] [xxx.xxx.xxx.xxx:62738-0#Example] [REWRITE] Rule: Match 'abc/999-456.html' with pattern '^(.*)/([0-9]+)-(.*).html$', result: 4
2011-04-12 17:57:01.758 [INFO] [xxx.xxx.xxx.xxx:62738-0#Example] [REWRITE] Source URI: 'abc/999-456.html' => Result URI: 'index.php?page=999'
Please be more specific on what is not working. provide a URL in question and your rewrite log.
 
Top