[solved] 404 insted of 403

Discussion in 'Install/Configuration' started by NanoG6, Sep 8, 2012.

  1. NanoG6

    NanoG6 New Member


    So I have no experience at all with LiteSpeed.
    The case is about directory listing. In the configuration I set:

    Use Server Index Files:No,
    Index Files:index.html, index.php,
    Auto Index:No,
    Auto Index URI:Not Set

    With that configuration, LiteSpeed always returning 404 error pages instead 403 when I'm visiting directory with no index file.
    So how to make LiteSpeed display correct 403 error page instead of 404 when there is no index file?

    Many thanks!
    Last edited by a moderator: Sep 8, 2012
  2. NiteWave

    NiteWave Administrator

    you can add following rewrite rules:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)(/index.html|/||/index.php)$ - [F,L]
    note: the rule is at virtual host level, not in .htaccess
  3. NanoG6

    NanoG6 New Member

    Hi NiteWave,

    So this is actually LiteSpeed "feature", out of the box. I thought I misconfigured something.
    I tried your suggestion and it works now. Thanks!

Share This Page