开发者

Mod Rewrite one variable or another on single rule?

开发者 https://www.devze.com 2023-04-11 13:17 出处:网络
Would it be possible to call one variable or another? My type page gets either tag or type variables. The code I have doesn\'t work, it only catches the first vari开发者_C百科able, tag.

Would it be possible to call one variable or another?

My type page gets either tag or type variables.

The code I have doesn't work, it only catches the first vari开发者_C百科able, tag.

How can I combine it into one or if not possible how do I make both work?

ex:

RewriteRule ^hen/egg/([^/\.]+)/?$ type.php?tag=$1 [L]
RewriteRule ^hen/egg/([^/\.]+)/?$ type.php?type=$1 [L]


Use different virtual paths for them:

RewriteRule ^hen/tag/([^/\.]+)/?$ type.php?tag=$1 [L]
RewriteRule ^hen/type/([^/\.]+)/?$ type.php?type=$1 [L]
0

精彩评论

暂无评论...
验证码 换一张
取 消