【发布时间】:2018-10-23 17:07:25
【问题描述】:
我正在使用首页控制器并使用 .htaccess 将所有请求路由到 index.php:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -!f
RewriteCond %{REQUEST_FILENAME} -!d
RewriteRule . index.php [L,QSA]
</IfModule>
但这是 cfg 不适用于直接链接(如 http://example.ru/index.html)并打开此 .html 文件,但即使在这种情况下,我也需要路由到 index.php。我该怎么做?
【问题讨论】:
标签: php apache .htaccess configuration