标签: .htaccess mod-rewrite url-rewriting
我有一个 htaccess 文件,其中我的 url 被覆盖。 这很好用。
现在我希望在所有网址中自动插入结尾“.html”。 如果末尾有“/”,则应将其删除。
这是我的 .htaccess 文件的内容:
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?path=$1 [NC,L,QSA]