开发者

friendly URL - two variables in the URL with htaccess

I need help me with some URL rewriting using .htaccess.

I would like to use this URL:

www.mydomain.com/page.php?var1=NY&var2=New York

And convert it to:

www.mydomain.com/page1/New York

That should 开发者_Python百科be done without losing the first parameter of course.


Perhaps (with the appropriate RewriteBase):

            RewriteRule ^page.php?var1=([^&]+)&var2=([^&])$ /page1/$2?var1=$1 [L,R]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜