2012-07-15 199 views

回答

1

你确定none of these worked for you?很多答案都是你想要的。例如,第一个结果具有下列规则:

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

或者,你可以尝试打开并让那为您处理:

Options +Multiviews 
+0

没有看到,但它确实诀窍,谢谢你 – 2012-07-15 20:33:02

0
RewriteCond %{HTTP_HOST} ^domain.com$ 
RewriteRule ^/file.php$ /file [L,R=301]