正在检测URL中未显示.php或.html的文件夹内容


Detecting folder content in URL not showing .php or .html

如何使您的URL以这种格式可见?但仍然具有这两种价值。

例如,当我的客户点击"about"页面的链接时,不会将他们带到文件夹的index.php,而是自动检测文件夹的.php或.html,并在URL中以这种格式显示它。

http://www.example.com/about/

不是这样的:

http://www.example.com/about/index.php

有没有办法用.htaccess

通常,我们使用DirectoryIndex s.t.

DirectoryIndex index.html index.php

在.htaccess或httpd.conf.中