Domain masking (and also straightforward web page web links)

How do you set up the domain name (I'm making use of GoDaddy) to mask the web server URL yet to add the below - web page link.

I'm assuming something like the Wikipedia en.wikipedia.org/wiki/something (or, if it would certainly call for httpd.conf accessibility, establishing it to add the default subpage link eg. ?page_id=2)

Currently I can set up the domain name to either be covered up entirely without revealing any kind of below - web page web links or to merely reroute my domain name to my internet server.

0
2019-12-02 02:58:26
Source Share
Answers: 1

If I read appropriately you desire web links to sub.domain.com/path to be rerouted to domain.com/path and also not simply domain.com (might have the naked/sub domains the upside-down around yet it coincides concept).

Usually this is called a loved one redirect and also can be performed with an Apache regulation like :

RewriteEngine on
RewriteRule ^http://sub\.domain\.com(/.*)$ http://domain.com$1 [L,R]

You do not require the L alternative, it is simply quits handling more regulations in instance another thing problems, yet you require the R (or R = 302) to reroute to an additional domain name. You might additionally desire the redirects to be cacheable by establishing cross country expiration days, etc

If you desire the subdomain component to be the course you can make use of :

RewriteEngine on
RewriteRule ^http://(.*)\.domain\.com(/.*)$ http://domain.com/$1$2 [L,R]
0
2019-12-03 00:27:51
Source