[solved] .htaccess DirectoryIndex Issue

Discussion in 'General' started by craigles, Mar 12, 2012.

  1. craigles

    craigles New Member

    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: Mar 13, 2012
  2. NiteWave

    NiteWave Administrator

    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
  3. craigles

    craigles New Member

    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
  4. NiteWave

    NiteWave Administrator

    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: Mar 12, 2012
  5. craigles

    craigles New Member

    Thanks NiteWave :)
    Much obliged once again.

Share This Page