[solved] rewriterule moving from apacha to litespeed

Discussion in 'General' started by morrisqueto, Mar 25, 2011.

  1. morrisqueto

    morrisqueto Member

    Here is my .htaccess
    <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 mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    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: Jun 28, 2011
  2. mistwang

    mistwang LiteSpeed Staff

    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.
  3. NiteWave

    NiteWave Administrator

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

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

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

    morrisqueto Member

    Thanks... can't make it work yet.
  5. webizen

    webizen Well-Known Member

    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:
    Please be more specific on what is not working. provide a URL in question and your rewrite log.
  6. morrisqueto

    morrisqueto Member

    Made it work by changing the order in some of the rules.

Share This Page