[solved] .htaccess DirectoryIndex Issue

craigles

Active Member
#1
Hi Guys,

A client has pointed out an issue with the DirectoryIndex command in their local .htaccess file.

If they set the DirectoryIndex to:

DirectoryIndex pages.php?pageid=7

Then the system simply loads a index of all the files in their account.
However, if you remove the ?pageid=7 then it will correctly load the pages.php file.

Apache is able to handle this without issue, what is the change of being able to make Litespeed also handle this??

Cheers,
Craig
 
Last edited by a moderator:

NiteWave

Administrator
#2
reproduced the issue on lsws, not tried on apache yet.

the workaround is to use the powerful rewriterule:

DirectoryIndex pages.php?pageid=7

===>

RewriteEngine On
RewriteRule ^$ pages.php?pageid=7
 

craigles

Active Member
#3
Hi NiteWave,

Thanks for that - will pass it along to the customer.
Can you let me know if it is Litespeed's intention to fix this issue in a future release, or will we always need to use this sort of re-write rule if we come across the issue again.

Cheers,
Craig
 

NiteWave

Administrator
#4
We'll investigate this issue for sure. This is the first time I'm aware of it. Thanks for reporting.

and just now I tested on apache. yes, as you stated, apache can handle
DirectoryIndex pages.php?pageid=7
as expected.
 
Last edited:
Top