将子域重写到域

时间:2011-10-24 20:26:09

标签: isapi-rewrite

我的请求看起来像http://cariers.example.com/style/all.css,需要重写为http://www.example.com/style/all.css。请求可以是从.css或.js等文件到实际页面.aspx的任何内容。

感谢您的帮助

1 个答案:

答案 0 :(得分:0)

尝试一下(对于ISAPI_Rewrite 3):

RewriteBase /
RewriteCond %{HTTP_HOST} ^[^.]+\.example\.com$ [NC]
RewriteRule ^(.*\.(?:css|js|aspx))$ http://www.example.com/$1 [NC,L]
相关问题