开发者

How to get $_GET['id'] when using .htaccess?

开发者 https://www.devze.com 2023-03-31 20:17 出处:网络
It should be only the id number but it 开发者_如何学编程has profile/ prefix now which broke everything.

It should be only the id number but it 开发者_如何学编程has profile/ prefix now which broke everything.

This is the rule I use:

RewriteCond %{REQUEST_URI} /v0\.3/profile/
RewriteRule ^(.+)$ /v0.3/profile.php?id=$1 [QSA,L]


Change you RewriteRule to:

RewriteRule profile/(.+)$ /v0.3/profile.php?id=$1 [QSA,L]
0

精彩评论

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