Php 使用.htaccess时如何获取$u get[';id';]?

Php 使用.htaccess时如何获取$u get[';id';]?,php,.htaccess,get,Php,.htaccess,Get,它应该只是id号,但它现在有profile/前缀,这破坏了一切 这是我使用的规则: RewriteCond %{REQUEST_URI} /v0\.3/profile/ RewriteRule ^(.+)$ /v0.3/profile.php?id=$1 [QSA,L] 将您重写的规则更改为: RewriteRule profile/(.+)$ /v0.3/profile.php?id=$1 [QSA,L]

它应该只是id号,但它现在有
profile/
前缀,这破坏了一切

这是我使用的规则:

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

将您重写的规则更改为:

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