【发布时间】:2015-10-09 02:17:09
【问题描述】:
文件:http://i.imgur.com/M7ioQzB.jpg
所以我有一个名为 hello.html 的 html 文件和一个名为 hello 的文件夹。但是如果你去 website.com/hello 它会出现 404 错误,因为它找到的是文件夹而不是 html 文件。我有一个看起来像这样的 .htaccess 文件..
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
但我不确定我能做些什么来解决这个问题。我希望 website/hello 转到 hello.html 而不是 hello 文件夹。
【问题讨论】: