开发者

friendly URL - two variables in the URL with htaccess

开发者 https://www.devze.com 2023-03-04 08:56 出处:网络
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

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

精彩评论

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