Mod rewrite 重写规则给出500个错误

Mod rewrite 重写规则给出500个错误,mod-rewrite,Mod Rewrite,我正在尝试将文件目录中的所有内容重写为index.php,它也在文件目录中。页面显示但总是出现500错误,有人能帮我吗 按相同顺序执行此操作: Options +FollowSymLinks RewriteEngine On RewriteRule ^files/(.*) files/index.php RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,

我正在尝试将文件目录中的所有内容重写为index.php,它也在文件目录中。页面显示但总是出现500错误,有人能帮我吗

按相同顺序执行此操作:

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^files/(.*) files/index.php

RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

工作完美,我也修复了我的文件中的一些东西,但是你的代码工作完美,非常感谢!!
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]

RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

RewriteCond %{REQUEST_URI} ^/files [NC]
RewriteRule ^(files)/.* $1/index.php [L]