htaccess多个获取值

时间:2011-04-21 17:33:44

标签: apache .htaccess mod-rewrite get

RewriteRule ^admin/load/loadSearch/([a-fA-F0-9])/([a-fA-F0-9])$ admin/load/loadsearch.php?type=$1&id=$2 [L]
RewriteRule ^admin/load/loaddSearch/([a-fA-F0-9])/([a-fA-F0-9])/(.*)$ admin/load/loadsearch.php?type=$1&id=$2&lname=$3 [L]

它不起作用请帮助我..第三个获取值是可选的

1 个答案:

答案 0 :(得分:1)

可能这就是你想要的:

RewriteRule ^admin/load/loadSearch/([a-fA-F0-9])/([a-fA-F0-9])/?$ admin/load/loadsearch.php?type=$1&id=$2 [L]
RewriteRule ^admin/load/loaddSearch/([a-fA-F0-9])/([a-fA-F0-9])/(.*)$ admin/load/loadsearch.php?type=$1&id=$2&lname=$3 [L]