Conditional Directory Index In Htaccess
Posted
by icelizard
on Server Fault
See other posts from Server Fault
or by icelizard
Published on 2010-02-19T14:05:21Z
Indexed on
2010/05/22
19:02 UTC
Read the original article
Hit count: 294
This relates to the question in:
http://stackoverflow.com/questions/1599717/conditional-directoryindex-in-htaccess
The answer states that the following should work:
SetEnvIf Remote_Addr ^127\.0\.0\.0$ owner
<IfDefine owner>
DirectoryIndex index.html
</IfDefine>
<IfDefine !owner>
DirectoryIndex index.php
</IfDefine>
I am not sure this works, the setting of the Env var deffinately does, but no matter what IP I visit the site from the DirectoryIndex is always index.php
Is there something wrong with the conditional or should I be using something else?
Thanks in advance
© Server Fault or respective owner