Does lsws has multiviews function?

Discussion in 'Install/Configuration' started by elvis7, Sep 17, 2005.

  1. elvis7

    elvis7 New Member

    Hi, I just started using lsws se V2.0.7. Before i used apache, I had there function called MultiViews, does lsws has this function ? If yes, how can it be added ?
  2. mistwang

    mistwang LiteSpeed Staff

    No, LSWS does not have explicit multiview support, but you can use simple rewrite rules to implement some simple multiview functions.
  3. elvis7

    elvis7 New Member

  4. mistwang

    mistwang LiteSpeed Staff

    You can try some thing like:
    Code:
    RewriteCond <your_doc_root_path>/$1.php      -f
    RewriteRule  ^/(.*)$                        /$1.php
  5. elvis7

    elvis7 New Member

    didn't work for me :(
    I wrote:
    RewriteCond /home/www/myweb/$1.php -f
    RewriteRule ^/(.*)$ /$1.php
  6. mistwang

    mistwang LiteSpeed Staff

    Is URL Rewrite enabled? Did you restart the server after configuration changes?

    To debug the rewrite rule, you can turn on the rewrite log by setting Log Level to '9', then check lsws/log/error.log

    It works for me.
  7. elvis7

    elvis7 New Member

    Still doesn't work. I got:
    Enable Rewrite Yes
    Log Level 9
    Rewrite Rules:
    RewriteCond /home/www/torrent/$1.php -f
    RewriteRule ^/(.*)$ /$1

    here what log shows:
    2005-09-22 00:59:19.286 [INFO] [86.57.0.20:61038-0#torrent] [REWRITE] Rule: Match '/' with pattern '^/(.*)$', result: 2
    2005-09-22 00:59:19.312 [INFO] [86.57.0.20:61038-0#torrent] [REWRITE] stat( /home/www/torrent/.php ) failed

    I'm new to lsws, but I already like this software. Maybe I'm doing something wrong ?
  8. mistwang

    mistwang LiteSpeed Staff

    rewrite rule should be:

    RewriteCond /home/www/torrent/$1.php -f
    RewriteRule ^/(.*)$ /$1.php

    You are accessing URL '/', this does not work, you should use directory indexing instead, add "index.php" or whatever index file used to "Directory Indexes". if you access "/index" URL, the above rule will serve it with /home/www/torrent/index.php.
  9. elvis7

    elvis7 New Member

    Yes, it works now. Tnx for help :?

Share This Page