简体   繁体   中英

ISAPI Rewrite 3 rule syntax

I'm installing ISAPI Rewrite 3. I'd like to do the following with it:

The box serving HTTP documents with ISAPI Rewrite 3 has a hypothetical URL of http://www.foo.com .

I want a rule that will point http://www.foo.com/blog to http://blog.foo.com . I don't want a physical redirection. I prefer a proxy so that it doesn't look like we're ever leaving www.foo.com.

How would one write this rule with ISAPI Rewrite?

Try this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^blog$ http://blog.example.com/ [P]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM