2015-12-30 70 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

謝謝!這似乎工作得很好:)是否有任何限制/這種方法的警告,我應該知道? –