大家好,并提前感谢,我试图添加一个url作为参数,但我不能。 我的原则是:htaccess url作为参数
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^info/([a-zA-Z0-9|]+)/(.*)/(.*)$ info.php?user=$1&text=$2&url=$3
在浏览器: http://localhost/example/info/peter/hi guy/http://www.example.com
返回数组$_GET
PHP
[user] => peter
[text] => hi guy/http:
[url] => www.example.com
什么是正确的:
[user] => peter
[text] => hi guy
[url] => http://www.example.com
我希望你的帮助感谢
非常感谢你的一切,完美的作品 – Alexd2 2011-04-01 13:05:48
大家早上好,一切正常,直到我得到了一个URL http://www.example.com?foo=34类型或http://www.example.com/index.php? user = 4&w = This-cat 这应该在htaccess中更改以支持所有类型的URL。 再次感谢。 – Alexd2 2011-04-04 07:43:32
将'[B]'更改为'[B,QSA]' – nitro2k01 2011-04-04 21:44:23