📜  使用 htaccess 从 url 中删除文件路径 - Html 代码示例

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

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