LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [solved] 404 insted of 403

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2012, 09:32 PM
NanoG6 NanoG6 is offline
New Member
 
Join Date: Sep 2012
Posts: 2
Default [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!

Last edited by NiteWave; 09-08-2012 at 03:58 AM..
Reply With Quote
  #2  
Old 09-08-2012, 12:26 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
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
Reply With Quote
  #3  
Old 09-08-2012, 03:23 AM
NanoG6 NanoG6 is offline
New Member
 
Join Date: Sep 2012
Posts: 2
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!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:40 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.