Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.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
Apache mod_重写失败_Apache_Mod Rewrite - Fatal编程技术网

Apache mod_重写失败

Apache mod_重写失败,apache,mod-rewrite,Apache,Mod Rewrite,在这之前,我会说我对重写不太了解,在过去,我只是简单地“让它工作起来” 以下是我正在使用的代码,并试图使其发挥作用: RewriteRule ^messagecenter/read/([^/\.]+)/?$ dispatcher.php?category=messagecenter&module=read&action=index&messageid=$1 [L] 当使用直接urldispatcher.php?category=messagecenter&module=

在这之前,我会说我对重写不太了解,在过去,我只是简单地“让它工作起来”

以下是我正在使用的代码,并试图使其发挥作用:

RewriteRule ^messagecenter/read/([^/\.]+)/?$ dispatcher.php?category=messagecenter&module=read&action=index&messageid=$1 [L]
当使用直接url
dispatcher.php?category=messagecenter&module=read&action=index&messageid=anynumber
时,它成功地调出页面,但当试图通过
messagecenter/read/anynumber/
访问页面时,它给我一个404。我也有类似的规则,但这一条不行


有什么建议吗?

你在哪里写的?在
.htaccess
文件中?是的,它在我的.htaccess文件中的public\u html中。@Eric请显示整个.htaccess(至少重写规则)。