我有一个如下链接:
在/country/search.php
<a href="<?php echo 'index.php?departments='.$value['department_id'].'&towns='.$value['town_id'].'&type='.$value['type_id'].'&id='.$value['id'] ?>">
当我使用下面的.htaccess
代码时,它什么也不做:
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /country/index.php?departments=$1&towns=$2&type=$3&id=$4 [L]
它在工具中:
http://example.com/0/0/4/122
...但是当我单击该链接时,它再次显示旧 URL。
这里有什么问题?
我正在.htaccess
使用此工具生成该代码:http ://www.generateit.net/mod-rewrite/