[solved] 404 insted of 403

#1
Hello,

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:

NiteWave

Administrator
#2
you can add following rewrite rules:
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)(/index.html|/||/index.php)$ - [F,L]
note: the rule is at virtual host level, not in .htaccess
 
#3
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!
 
Top