本文介绍了WampServer 2.2A-X32的.htaccess不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用WampServer 2.2A-X32,我尝试使用.htaccess文件在我的根目录文件夹中。

i am using WampServer 2.2a-x32 and i am trying to use .htaccess file in my webroot folder.

我有rewrite.php文件,这里是它的code

i have rewrite.php file and here is its code

<h2 align=center>
<?php
// mod_rewrite Test Page
if($_GET['link']==1){echo"You are not using mod_rewrite";}
elseif($_GET['link']==2){echo"Congratulations!! You are using Apache mod_rewrite";}
else{echo" mod_rewrte Test ";}
?>
</h2>

<hr>

<head>
</head>

<body>
<p><a href="rewrite.php?link=1">LINK1</a> = rewrite.php?link=1</p>
<p><a href="link2.html">LINK2</a> = link2.html</p>
</body>
</html>

我有.htaccess文件,这里是它的code

i have .htaccess file and here is its code

RewriteEngine On
RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]

在我的http.conf文件,我有

in my http.conf file i have

LoadModule rewrite_module modules/mod_rewrite.so uncommented (without #)

和我的Apache配置,听取8080端口不知道它的问题。

and my Apache is configured to listen to 8080 port not sure if its the issue.

所以,如果我打的链接的http://本地主机:8080 /测试/ rewrite.php 我能看到的页面,但我击球的时候链接2 mod_rewrite的似乎不工作。我得到未找到
所请求的URL /test/link2.html没有在此服务器上找到。

So if i hit the link http://localhost:8080/test/rewrite.php i get to see the page but when i hit link2 mod_rewrite doesn't seem to work. i get Not FoundThe requested URL /test/link2.html was not found on this server.

我的系统是windows 7 X32
有什么建议?

My system is windows 7 x32any suggestions ?

推荐答案

感谢名单我actualy设法解决它。问题是,该文件没有corectly命名,而不是它的.htaccess htaccess的是。

thanx i actualy managed to fix it. The problem was that the file was not named corectly, instead of .htaccess it was htaccess.

这篇关于WampServer 2.2A-X32的.htaccess不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 14:29