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
Apache Mod#u rewrite不';t清理URL';s_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Apache Mod#u rewrite不';t清理URL';s

Apache Mod#u rewrite不';t清理URL';s,apache,.htaccess,mod-rewrite,Apache,.htaccess,Mod Rewrite,我无法让我的apache清理我丑陋的url 我知道mod_rewrite是有效的,因为我用这个规则尝试过: RewriteEngine on RewriteRule ^oranges.html$ apples.html 它显示了apples.html页面 我试图使用这个,但它没有任何作用 RewriteEngine On RewriteRule ^([a-zA-Z0-9]+)$ index.php?page=$1 RewriteRule ^([a-zA-Z0-9]+)/$ index.php?

我无法让我的apache清理我丑陋的url

我知道mod_rewrite是有效的,因为我用这个规则尝试过:

RewriteEngine on
RewriteRule ^oranges.html$ apples.html
它显示了apples.html页面

我试图使用这个,但它没有任何作用

RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)$ index.php?page=$1
RewriteRule ^([a-zA-Z0-9]+)/$ index.php?page=$1
我想要这个网址:


如下所示:

看起来语法正确-是否在此处显示整个
.htaccess
文件?可能还有其他规则正在取消这些。什么不起作用?你拿到404了吗?是的,。事实上,我在这里展示了我的整个.htaccess。所以没有其他规则。问题是什么都没有发生,没有URL被重写!