Search code examples
phpregex.htaccessurl-rewritingsubdomain

change the subdomain without creating subdomain using htaccess url Rewriting php


I have a website http://www.example-domain.com and I want to rewrite the URL so that I can change this subdomain with the subdomain I want, like I want this URL to be called like http://abc.example-domain.com instead of http://www.example-domain.com and still get the same page being loaded as we are getting on http://www.example-domain.com, i dont want a new subdomain with name 'abc' instead i want my url to be rewritten in such a way that it looks like that it's a subdomain in it but actually it isn't and i need it to be done by using URL REWRITING using htaccess. plz elaborate a bit along with you solution. thx


Solution

  • This is not possible.

    The browser will look up the IP address of the subdomain in the DNS (Domain Name System) find nothing and load an error page.