0

我想从 URL 中删除 .php 扩展名,以便像http://mysite.com/abc.php这样的 URL将重定向到http://mysite.com/abc如何在 apache 中使用 .htaccess

4

1 回答 1

1
RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

你可以很容易地谷歌它......

于 2012-09-02T10:27:22.560 回答