2016-08-15 89 views
0

美好的一天,.htaccess索引文件上的錯誤404

我想知道您是否可以幫助我。
我有一個.htaccess文件:

RewriteEngine On 
RewriteCond %{REQUEST_METHOD} =POST 
RewriteRule^- [L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^([^\.]+)$ $1.php [NC,L] 

## hide .php extension snippet 

# To externally redirect /dir/foo.php to /dir/foo 
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] 
RewriteRule^%1 [R,L] 

ErrorDocument 404 http://scytech.co.za/Page-Not-Found/404 

當我嘗試打開它http://admin.scytech.co.za給我一個404錯誤,但是當我嘗試打開http://admin.scytech.co.za/index它的工作原理100%
你能幫幫我嗎?

回答

1

試試這個...

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php?/$1 [L] 
+1

嘗試把下重寫規則^([^ \。] +)$ $ 1.PHP [NC,L] –