62,041
社区成员
发帖
与我相关
我的任务
分享
RewriteCond %{HTTP_HOST} ^(?!www\.xxx\.com).*$ [I]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.xxx\.com$ [I]
RewriteRule ^/$ /blog.aspx?id=%1 [U,L]
RewriteRule ^/User/(\d+)$ /User.aspx?id=$1 [I, L]
RewriteRule ^/User/(\w+)$ /User.aspx?name=$1 [I, L]
# IIRF.ini
#
# demonstrates transforming domain names to querystring params.
#
RewriteEngine ON
RewriteLog c:\inetpub\iirfLogs\iirf
RewriteLogLevel 1
StatusInquiry ON
CondSubstringBackrefFlag *
# +++++++++++++++++++++++++++++++++
# Transform any domain name that is not www, into a query
# string param. The reference character for captured
# groups in the RewriteCond, is * , according to the
# CondSubstringBackrefFlag directive. (* is also the default).
RewriteCond %{HTTP_HOST} ^(?!www)([^.]+)\.mydomain\.com [I]
RewriteRule ^/(.*)$ /mypage?host=*1 [U,L]