eastboundr
eastboundr

Reputation: 1877

Cross-domain URL Rewrite possible? (Entire URL)

Say I have a domain name bound to my site. The domain name is www.example.com

Normally, it will be easy to rewrite the URL from www.example.com/foo to www.example.com/bar.

However, I would like to rewrite www.example.com into www.foobar.com, is this rewrite possible?

Notice I'm talking about "Rewrite" not "Redirect". Using redirect, the URL will be translated into www.foobar.com after page loads. In my case, I would like it to go to www.foorbar.com but still have www.example.com as the web URL in the address bar for the browser.

I'm probably asking too much, yet I really don't know how far we could go in techniques these days.

By the way I'm using IIS 7

Upvotes: 1

Views: 2446

Answers (2)

David Burg
David Burg

Reputation: 1163

Yes if foobar.com is also a website you own in your network. It's the reverse proxy feature of URL rewrite:

http://weblogs.asp.net/owscott/archive/2013/10/24/creating-a-reverse-proxy-with-url-rewrite-for-iis.aspx

Upvotes: 0

woz
woz

Reputation: 10994

Rewrite? No. You can set multiple domain names to go to the same place, but this would be with your domain host, not an IIS setting. If you could arbitrarily rewrite URLs, think of all the security problems that would arise.

Upvotes: 1

Related Questions