Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This discussion on the Helicon Tech forums addresses the same issue. <a href="http://www.helicontech.com/forum/8460-rewrite_proxy_to_2d_machine.html" rel="nofollow">http://www.helicontech.com/forum/8460-rewrite_proxy_to_2d_machine.html</a></p> <p>The first example provides code for <strong>ISAPI Rewrite 2</strong>, but the thread includes <strong>ISAPI Rewrite 3</strong> syntax further down the page. Here's an adaptation of their version 3 code for your example.</p> <pre><code>RewriteEngine on RewriteBase / RewriteRule ^blog$ http://mysite/blog/ [NC,R=301] RewriteProxy ^/blog(/.*)?$ http\://blog.com$1 [NC,U] </code></pre> <p>(This is untested because I am running ISAPI Rewrite 2.) Note that I hit some snags when attempting to reverse proxy another site under my "main" domain. You might discover these issues as well.</p> <p><strong>1) Non-Relative Links</strong></p> <p>Unless the application has been coded from the ground up to assume reverse proxying, I found it likely to break. A bare-bones HTML page using all relative links like will work. However, serving HTML through a reverse proxy that contains this code will map to <a href="http://mysite/page_from_the_root.html" rel="nofollow">http://mysite/page_from_the_root.html</a>. ISAPI Rewrite does not know to intercept that request, but it would proxy content if the user's browser hit <a href="http://mysite/blog/page_from_the_root.html" rel="nofollow">http://mysite/blog/page_from_the_root.html</a></p> <p><strong>2) Cookies</strong></p> <p>Blog.com might write cookies from the blog.com domain. A page served through the MySite domain might not be able to access these cookies, depending on the user's browser settings.</p> <p><strong>3) JavaScript and AJAX</strong></p> <p><strong>4) SSL Certificates</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload