开发者

Can I declare the DirectoryIndex In .htaccess Non-recursively?

In my /httpdocs/ folder I need to change the filename of index.php. I did this by writing a new line to my .htac开发者_运维问答cess file:

DirectoryIndex index2.php

However, it seems that all subfolders under /httpdocs/ were looking for index2.php for their DirectoryIndex file. Is there a way I can alter the DirectoryIndex file for my /httpdocs/ folder without it recursively affecting every folder under it?


You could try this...

DirectoryIndex index2.php index.php index.html

Apache will look from left to right for the index file.

For example, if index2.php doesn't exist, it will look for index.php.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜