Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.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 重写不起作用_Apache_Rewrite - Fatal编程技术网

Apache 重写不起作用

Apache 重写不起作用,apache,rewrite,Apache,Rewrite,我完全迷路了,尝试任何愚蠢的事情。也许你知道情况。我在这里和谷歌上尝试了许多线索的提示,但没有任何帮助。我已经在Apache上加载了重写模块(由phpinfo检查)。对于我创建的.htaccess站点,其中存储了当前的简单规则: RewriteEngine on RewriteBase / RewriteRule ^/certifikaty\.html$ certifikaty.php 所以,我希望你能表现出来。不幸的是,没有。因此,我在httpd.conf中设置以下行: RewriteLog

我完全迷路了,尝试任何愚蠢的事情。也许你知道情况。我在这里和谷歌上尝试了许多线索的提示,但没有任何帮助。我已经在Apache上加载了重写模块(由phpinfo检查)。对于我创建的.htaccess站点,其中存储了当前的简单规则:

RewriteEngine on
RewriteBase /
RewriteRule ^/certifikaty\.html$ certifikaty.php
所以,我希望你能表现出来。不幸的是,没有。因此,我在httpd.conf中设置以下行:

RewriteLogLevel 9
RewriteLog "logs/rewrite.log"
文件(rewrite.log)已创建,但即使在服务器重新启动后,它仍然是空的

拜托,你能帮我摆脱这一切吗


Marek

我找到了解决方案——我的httpd.conf中没有AllowOveride指令。这意味着所有httpd.conf都将被忽略……

删除
/
<代码>重写规则不包括请求URI的开头
RewriteRule^certifikaty\.html$certifikaty.php[L]
。。。。。它也不能正常工作。您希望它重定向到
certifikaty.php
还是内部重写?如果需要重定向,请添加
[L,R=301]
我希望在我的web浏览器中输出certifikaty.php。相反,我得到的是404。添加[L,R=301]没有帮助:(.文件
/certifikaty.php
实际存在吗?其中哪一个是真实的文件?