开发者

How do variables work in mod ReWrite? Example included

开发者 https://www.devze.com 2023-02-13 00:52 出处:网络
Can anybody explain how this is working? RewriteRule ^update_my_account/([0-9]+开发者_如何学运维)/([0-9]+)/?$/index.php?page_id=$1&updated=$2 [L]

Can anybody explain how this is working?

RewriteRule ^update_my_account/([0-9]+开发者_如何学运维)/([0-9]+)/?$      /index.php?page_id=$1&updated=$2 [L]

What part of the URL is $1 and $2 determined by?


$1 means first group anything matched by first ([0-9]+) in your rewrite regex and $2 is second ([0-9]+).


$1 contains whatever is matched by the first expression inside brackets ([0-9]+), and $2 contains whatever is matched by the second ([0-9]+).

0

精彩评论

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