Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess:Removing/index.php/foo_.htaccess - Fatal编程技术网

.htaccess:Removing/index.php/foo

.htaccess:Removing/index.php/foo,.htaccess,.htaccess,我有一个用康托建的网站。我刚刚打开了URL重写,现在index.php/foo返回404错误。我试图用 RewriteCond %{REQUEST_URI} ^/index\.php/ RewriteRule ^index.php/(.*) /$1 [R,L] 但这没有帮助 以下是contao factory.htaccess的重写部分以及我添加的全部内容(我编辑了所有评论内容以使其更简短): 重新启动发动机 重写基/ 在这里重写cond%{REQUEST_URI}^/index\.php/

我有一个用康托建的网站。我刚刚打开了URL重写,现在
index.php/foo
返回404错误。我试图用

RewriteCond %{REQUEST_URI} ^/index\.php/
RewriteRule ^index.php/(.*) /$1 [R,L]
但这没有帮助

以下是contao factory.htaccess的重写部分以及我添加的全部内容(我编辑了所有评论内容以使其更简短):


重新启动发动机
重写基/
在这里重写cond%{REQUEST_URI}^/index\.php/#我的规则
重写规则^index.php/(.*)/$1[R,L]#我的规则在这里
发动机熄火
重写规则。*\.html$index.php[L]
重写规则^[a-z]{2}/$index.php[L]
重写规则^([a-z]{2})$$1/[R=301,L]

我在这里没有得到什么?

没关系。我找到了答案

<FilesMatch "\.(png|gif|jpe?g|js|css|ico|THIS HERE CAUSED IT: --> ***php***|xml|csv|txt|gz|swf|flv|eot|woff|svg|ttf|htm)$">
RewriteEngine Off
</FilesMatch>

发动机熄火
<FilesMatch "\.(png|gif|jpe?g|js|css|ico|THIS HERE CAUSED IT: --> ***php***|xml|csv|txt|gz|swf|flv|eot|woff|svg|ttf|htm)$">
RewriteEngine Off
</FilesMatch>