LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   [solved] 404 insted of 403 (http://www.litespeedtech.com/support/forum/showthread.php?t=6218)

NanoG6 09-07-2012 09:32 PM

[solved] 404 insted of 403
 
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!

NiteWave 09-08-2012 12:26 AM

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

NanoG6 09-08-2012 03:23 AM

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!


All times are GMT -7. The time now is 03:32 PM.