📜  htaccess 删除 .html 代码示例

📅  最后修改于: 2022-03-11 14:52:57.428000             🧑  作者: Mango

代码示例1
#remove html file extension-e.g. https://example.com/file.html will become https://example.com/file
RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html [NC,L]