1

I have a website on a subdomain, and would like to hide the fact that it's a sub-domain. How can I do so?

For example, the site is www.example.com, and it's a sub-domain of www.mydomain.com. I don't want people to know that example.mydomain.com is the same as www.example.com. How do I hide this? With .htaccess? How?

Thanks!!

2 Answers 2

0

www.example.com is impossible to be a sub-domain of www.mydomain.com. I think you mean they point to the same IP address and, therefore, they point to the same website (or there are some kind of redirect).

A domain is simply, example.com or mydomain.com. Examples of sub-domains of these domains are: www.example.com, mobile.example.com, whatever.mydomain.com and they could, or not, point to the domain root.

I'll present you an example:

Google App Engine let's you chose a appspot.com subdomain, for instance, myapp.appspot.com. If you call this subdomain you access your website. But people usually want to use their own domain, or a subdomain, for instance, myapp.mydomain.com. Both subdomains will return the same content. If you'd wish to disable the appspot.com subdomain, you may follow this solution.

0

You could use the 'proxy|P' (force proxy) flag. Read the manual http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

Note: mod_proxy must be enabled in order to use this flag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.