url 重定向
test/year/2006/action/_add.html 如何将以上的url 重定向到以下 test.php 文件中
>>>
test.php?year=2006&action=_add
.htaccess该如何更改
# 将 RewriteEngine 模式打开
RewriteEngine On
# Rewrite 系统规则请勿修改
RewriteRule ^archiver/((fid|tid)-[0-9]+\.html)$ archiver/index.php?$1
RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2
RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$3&page=$2
RewriteRule ^space-(username|uid)-(.+)\.html$ space.php?$1=$2
RewriteRule ^tag-(.+)\.html$ tag.php?name=$1
RewriteRule ^k/(.*)/(.*).html$ /article.php?tid=$2&dtime=$1
ErrorDocument 404 /errors/notfound.html
[解决办法]
RewriteRule ^test/year/([0-9]+)/action/([a-z\-]+)\.html$ test.php?year=$1&action=$2
没有测试,看看可以不