Can URL rewrite display different domain name?

Alles, was den Apache betrifft, kann hier besprochen werden.

Can URL rewrite display different domain name?

Postby Traktor » 24. December 2016 12:29

I'm new to Apache and wanted to know if this is possible :?:

I would like to know if I can use URL rewrite to have a different domain name display for certain pages.
I am planning out a site ( for example) and some users will have a profile page and wanted to know if URL rewrite can be used on some of these profile pages.

For example, a user is cruising the site and comes across a profile they want to check out. They click on a link to them and it takes them to their profile page hosted on ( for example) but the URL is rewriten to show for that profile page.

A couple of questions:

1) Can URL rewrite do this, specifically display a totally different domain url?

2) As far as I understand URL rewrite happens in the background so it should not be noticed by search engines for example. Will this page be treated just like any other page by search engines?
Posts: 1
Joined: 24. December 2016 12:22
XAMPP version: 1.8
Operating System: osx 10

Re: Can URL rewrite display different domain name?

Postby Altrea » 24. December 2016 15:01


No, url rewrite does only work for the same origin.
If you try to use a rewrite for a different domain a redirect will get fired instead.

The only way you can achieve this is by html frameset or if you grab and output the contents with help of a programming language like php or javascript.

Best wishes,
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
AF Moderator
Posts: 10385
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Can URL rewrite display different domain name?

Postby Nobbie » 24. December 2016 22:11

I am unsure.

If i got it right, i think you can do this, but not via Rewrite, instead by simply using Redirects and VirtualHosts. But to be sure, we need a more precisely description of what you are trying to do.
Posts: 11716
Joined: 09. March 2008 13:04

Return to Apache

Who is online

Users browsing this forum: No registered users and 18 guests