htaccess文件重写错误 - ^ trip /(\ d +)* $ ./trip.html?tripId=$1

时间:2016-10-27 16:11:17

标签: .htaccess mod-rewrite

我很高兴使用htaccess,我已经在项目文件夹中创建了一个.htaccess文件(我在localhost上使用xampp运行它,如果它改变任何东西)。

我在文件中有以下内容:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^trip/(\d+)*$ ./trip.html?tripId=$1

我想得到的是我可以访问localhost:8000 / trip / 1并且它将与localhost:8000 / trip.html相同?tripId = 1

但我一直得到"由于某种原因无法获得/旅行/ 1,我做错了什么?

提前致谢, 加比。

0 个答案:

没有答案