rewrite problem, please help

#1
Hello,
i have problem with rewrite rules
i have hosted my site on micfo.com, and micfo recently changed server, and in new server there is litespeed instead of apache as they say, and some of rewrite rules do not work, as they say it should work without any problem but it is not working, what can i do? i am not the developer, but just owner of the site,

here is a part from rewrite rules in my .htaccess
for example here "main" works but "gallery" do not work


RewriteEngine On

#main
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(\main|\main\/)$ index.php?sec=main [L,QSA]

#gallery
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(\gallery|\gallery\/)$ index.php?sec=gallery&tab=0 [L,QSA]

#gallery PAGE
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^gallery-([0-9]+)$ index.php?sec=gallery&tab=0&page=$1 [L,QSA]

...

AddHandler application/x-httpd-php5 .php


would be glad if you advise some help
Thank you
 

mistwang

LiteSpeed Staff
#2
rewrite rule in .htaccess has to remove the leading "/", it is called rewrite base.


RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(main|main\/)$ index.php?sec=main [L,QSA]

#gallery
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(gallery|gallery\/)$ index.php?sec=gallery&tab=0 [L,QSA]
 
Top