2015-12-30 73 views

回答

1

尝试:

RewriteEngine on 

#if /foo/index.php is not a file  
RewriteCond %{REQUEST_FILENAME}\.index.php !-f 
#then redirect /foo to /foo.php 
RewriteRule ^([^./]+)/?$ /$1.php [NC,L,R] 
+0

谢谢!这似乎工作得很好:)是否有任何限制/这种方法的警告,我应该知道? –