.htaccess for LiteSpeed

Discussion in 'Apache Migration/Compatibility' started by johansson, May 6, 2012.

  1. johansson

    johansson New Member

    Good afternoon,
    I have a little problem with the .htaccess for LiteSpeed.
    I have the rewirte rules for an apache web server and I tried it for LiteSpeed but it doesn't work.
    May be you can help me to change the rewrite rules.
    This is for Apache and hope someone can change it so it works for LiteSpeed.
    Code:
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    
    RewriteRule ^/about$ /about.php [L]
    RewriteRule ^/(.+)$ /index.php?id=$1 [QSA,L]
  2. webizen

    webizen New Member

    to troubleshoot rewrite in general, enable rewritelogging (add 'RewriteLogLevel 9' in vhost httpd.conf and restart lsws to make it effective) to check [REWRITE] entries in error_log.

    for rules .htaccess, leading '/' in ^/about$ and ^/(.+)$ should be removed as follows:

  3. johansson

    johansson New Member

    Thanks for the answer.
    But with that .htaccess it doesn't work too.

    Today I saw that there was a error_log.
    Code:
    [08-May-2012 14:11:32 UTC] PHP Fatal error:  Call to undefined method mysqli_stmt::get_result() in /home/spastetk/public_html/inc/paste.class.php on line 53
    [08-May-2012 14:11:32 UTC] PHP Fatal error:  Call to undefined method mysqli_stmt::get_result() in /home/spastetk/public_html/inc/paste.class.php on line 53
    And here you can finde the "paste.class.php" :
    https://ezcrypt.it/pY4n#dweUKep09OugeH3b8FALawm7

    I tried to use the same script like ezcypt for my website only the url rewrite with LiteSpeed won't work.
  4. webizen

    webizen New Member

    Did you build matching php in LSWS? Seems mysqli isn't built in lsphp5.

Share This Page