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>
什么我没有得到吗?