【发布时间】:2012-09-01 06:32:53
【问题描述】:
.htacess 我用过的规则 -
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/\.]+)/?$ profile.php?user=$1 [L]
RewriteRule ^(.*)$ profile.php?user=$1 [QSA,NE]
正确的例子 -
http://mydomain.com/http://fatalweb.com/articles/8/definitions-for-htaccess-regex-character
传递给 $1 的值是 - http://fatalweb.com/articles/8/definitions-for-htaccess-regex-character
http://mydomain.com/https://www.google.com/search?q=_get&ie=utf-8&oe=utf-8&aq=t
传递给 $1 的值是 - https:/www.google.com/search
我如何确保整个 url https://www.google.com/search?q=_get&ie=utf-8&oe=utf-8&aq=t 连同所有查询参数都传递给 $1
【问题讨论】: