更新时间:2023-11-17 22:51:52
要删除PHP扩展从PHP文件:
To remove the .php extension from a PHP file:
Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
如果你想从一个HTML文件中删除.html扩展名:
If you want to remove the .html extension from a html file:
RewriteRule ^([^\.]+)$ $1.html [NC,L]
或看到这个帖子: