rewrite problem, please help

Discussion in 'Apache Migration/Compatibility' started by metheart, Dec 3, 2009.

  1. metheart

    metheart New Member

    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
  2. mistwang

    mistwang LiteSpeed Staff

    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]
  3. metheart

    metheart New Member

    oh thanks much, it worked, thank you again :)

Share This Page