0
我有一個用Contao構建的網站。我剛剛打開了URL重寫,現在index.php/foo
返回404錯誤。我試圖重寫/index.php/foo
到/foo
與.htaccess:刪除/index.php/foo
RewriteCond %{REQUEST_URI} ^/index\.php/
RewriteRule ^index.php/(.*) /$1 [R,L]
,但它並不能幫助。
這裏的contao工廠的.htaccess我在它的整體增加的改寫部(我編輯了所有的評論的東西,使其更短):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_URI} ^/index\.php/ # My rule here
RewriteRule ^index.php/(.*) /$1 [R,L] # My rule here
<FilesMatch "\.(png|gif|jpe?g|js|css|ico|php|xml|csv|txt|gz|swf|flv|eot|woff|svg|ttf|htm)$">
RewriteEngine Off
</FilesMatch>
RewriteRule .*\.html$ index.php [L]
RewriteRule ^[a-z]{2}/$ index.php [L]
RewriteRule ^([a-z]{2})$ $1/ [R=301,L]
</IfModule>
什麼我沒有得到嗎?