我的网址是这样的。 http://site.org/index.php?page=tags&tag=tagname
我想把它重写为
我目前的.htaccess
# RewriteRule ^/?([a-z]+)$ $1.php [L]
RewriteEngine on
RewriteRule ^([A-Za-z0-9-_]+)$ index.php?paste=$1 [L]
RewriteEngine on
RewriteRule ^([A-Za-z0-9-_]+)/edit$ index.php?paste=$1&page=edit [L]
RewriteEngine on
RewriteRule ^([A-Za-z0-9-_]+).txt$ index.php?paste=$1&paste_txt=$1 [L]
RewriteEngine on
RewriteRule ^([A-Za-z0-9-_]+).txt$ index.php?paste=$1&paste_txt=$1 [L]
RewriteEngine on
RewriteRule ^([A-Za-z0-9-_]+)/delete$ index.php?paste=$1&page=delete [L]
RewriteEngine on
RewriteRule ^([A-Za-z0-9-_]+).download$ index.php?paste=$1&paste_download=$1 [L]
RewriteEngine on
RewriteRule ([^/\.]+)/?.cgi$ index.php?page=$1 [L]
#RewriteEngine on
#RewriteRule ([^/\.]+)/?.txt$ index.php?paste_txt=$1 [L]
#RewriteEngine on
#RewriteRule ([^/\.]+)/?.download$ index.php?paste_download=$1 [L]
答案 0 :(得分:0)
RewriteRule ^/?([A-za-z0-9]+)/([A-za-z0-9]+)$ index.php?page=$1&tag=$2 [L]
我相信这应该这样做......那就是你想要标签中的数字。如果没有,请从每个部分删除0-9。