LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (http://www.linuxquestions.org/questions/general-10/)
-   -   forwarding, masking & aliasing a domain - How To Do that!? (http://www.linuxquestions.org/questions/general-10/forwarding-masking-and-aliasing-a-domain-how-to-do-that-4175484369/)

sayhello_to_the_world 11-12-2013 03:23 PM

forwarding, masking & aliasing a domain - How To Do that!?
 
hello dear linux-community,

good day dear Linux-friends - i hope youre well and all is fine!

The qustion of the day meets an issue i am faced with :


Forwarding example.COM to example.NET

what does the visitor see:

a. as a site?
b. what does the adressbar display?

Question: is it possible to do a forwarding that shows the domain-name "example.com" in the adressbar? -.... and shows the content of example.net


love to hear from you
greetings ;)

btw - see also this example
http://support.godaddy.com/help/arti...ur-domain-name

yours say

Kustom42 11-12-2013 03:32 PM

You can do this yourself but every registrar including GoDaddy usually provide this service for free off of their own hosted servers. Have you looked to see if if your registrar provides this or not?

Otherwise you will need to implement and use mod_proxy and code your own redirects within Apache.
http://httpd.apache.org/docs/current/mod/mod_proxy.html

sayhello_to_the_world 11-13-2013 11:56 AM

hello dear kustom

thx for the answer - well i am not usein GoDaddy -
a friend of me administers a root server. so we re glad to get the things done "on the own server!"


Well Dear kustom! - hmm - i guess that i will do it with mod_proxy using a combination of the ProxyPass and ProxyPassReverse directives. What do you say!?



see the above mentioned forwarding - see the forward-task; example.COM to example.NET

what does the visitor see:

a. as a site?
b. what does the adressbar display?

Question: is it possible to do a forwarding that shows the domain-name "example.com" in the adressbar? -.... and shows the content of example.net

i am happy that you confirm that this is possible!

Kustom - that is great!


the things i want to achieve: Here is what I am trying to accomplish: When one navigates to My_URL1.com it goes to My_URL2.com


well - i think it's possible to forward the domain name without change in the address bar . It is called "Masked" Forwarding. This type of forwarding is used to forward my domain to another website, while keeping my domain or subdomain name in the web browser's address bar.
The real address does not appear at all.

in detail: Masked domain forwarding allows you to redirect the domain name to another web site, but conceal the web address of the destination web site. In standard forwarding, visitors will not see the original domain name they clicked or typed in the address box at the top of their browsers when they reach the destination site; the destination domain will be displayed. With masked forwarding, the visitors will see the original domain name when they reach the destination. We can use masked domain forwarding when you want to hide a web address that may not be user-friendly, such as Widget (UK) Ltd.



again:
Here is what I am trying to accomplish: When one navigates to My_URL1.com it goes to My_URL2.com

Now, what I would like to see in the address bar is the My_URL1.com - As well, as I navigate through the site, I would like to continue to see My_URL1.com as the host

i.e.
My_URL1.com
redirects to
My_URL2.com

note: all is on my own server: my friend does configure the nameserver and all the stuff is on my root-server.

so i will digg deeper into the techniques of Masked forwarding..

one lastquestion: Should i use .htaccess on my own server and rewrite from MyURL.com: The Leading Domain Names Site on the Net so that the to spell it out in other words: can URL masking/forwarding/redirecting done with

a. With a RedirectRule in the .htaccess file:

example - Redirect from www.My_URL1.com/link to www.My_URL2.com/link:

Code:

RewriteEngine On
RewriteCond %{HTTP_HOST} !www.My_URL1.com/link$ [NC]
RewriteRule ^(.*)$ http://www.My_URL2.com/link/$1 [L,R=301]


to achieve it in Apache.


All times are GMT -5. The time now is 01:10 AM.