Php 在Apache中重写URL对我不起作用

Php 在Apache中重写URL对我不起作用,php,apache,url-rewriting,Php,Apache,Url Rewriting,我正在使用WAMP,并已在http://localhost/snap2/html'文件夹。我试图执行以下重写规则,但这对我不起作用 服务器在下面给我一个错误: 在此服务器上找不到请求的URL/snap2/html/browsed.html My.htaccess文件位于html文件夹中,其结构如下: `重新启动发动机 重写规则^decision/([0-9]+)$/snap2/html/decision.php?PanelID=$1` 网站的结构类似于“www/snap2/html” 事实上,我

我正在使用WAMP,并已在http://localhost/snap2/html'文件夹。我试图执行以下重写规则,但这对我不起作用

服务器在下面给我一个错误:

在此服务器上找不到请求的URL/snap2/html/browsed.html

My.htaccess文件位于html文件夹中,其结构如下:

`重新启动发动机

重写规则^decision/([0-9]+)$/snap2/html/decision.php?PanelID=$1`

网站的结构类似于“www/snap2/html”

事实上,我正试图重写以下url

进入

另外,Options+FollowSymLinks给了我一个错误500,因此,我对它进行了评论


任何帮助都将不胜感激。

您的书写
重写规则
两次。试一试

RewriteRule decision/([0-9]+)$ /snap2/html/decision.php?PanelID=$1 [L, QSA]

试试这个:

RewriteEngine On

RewriteRule RewriteRule ^snap2/html/decision/([0-9]+)$ /snap2/html/decision.php?PanelID=$1

但我想这不是你想要的。但也许你会发现你错在哪里。

正则表达式中的Symbol
^
意味着下面的字符串应该位于URL的开头。因此,您必须包含整个路径,有关更多示例,请参见

谢谢您的写作。我更新了我的问题,没有更多的信息。你能再看一遍吗?它给了我一个错误:在这个服务器上找不到请求的URL/snap2/html/decision/20。
RewriteEngine On

RewriteRule RewriteRule ^snap2/html/decision/([0-9]+)$ /snap2/html/decision.php?PanelID=$1