由.htaccess文件导致的WAMP服务器错误

由.htaccess文件导致的WAMP服务器错误,.htaccess,url-rewriting,wamp,.htaccess,Url Rewriting,Wamp,我正在使用下面的htaccess代码进行urlrewrite,它正在工作 Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On #RewriteBase / # If the request is for a valid directory #RewriteCond %{REQUEST_FILENAME} !-d # If the request is for a valid file Rewrit

我正在使用下面的
htaccess
代码进行
url
rewrite
,它正在工作

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
#RewriteBase /

# If the request is for a valid directory
#RewriteCond %{REQUEST_FILENAME} !-d
# If the request is for a valid file
RewriteCond %{REQUEST_FILENAME} -f
# If the request is for a valid link
RewriteCond %{REQUEST_FILENAME} !-l
# do not do anything
RewriteRule ^ - [L]


# forward /john to user/profile.php?name=john
RewriteRule ^(.+)$ user/profile.php?username=$1 [L,QSA,NC]
然而,当我升级到最新的
WAMP2
服务器时,我开始收到下面的错误消息

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

请有人解释一下我为什么会出现这个错误,以及如何修复它。谢谢。

服务器配置文件上的mod_rewrite实际上已关闭,我打开了它,重新启动了服务器,然后它又开始工作了。

我也遇到了同样的问题,但后来我发现在
httpd.conf
中,mod#u重写已经被散列出来,这意味着它被关闭了,所以我删除了行开头的#,重新启动了所有服务,结果成功了

你的错误日志怎么说?(它可能会说
RewriteEngine
是一个错误的指令),您确定吗?@JonLin Yes mod_rewrite已打开。让我检查一下错误日志