-2

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

  • 1
    Does this answer your question? [Rewrite subdomain to main domain without redirect with htaccess](https://stackoverflow.com/questions/33217233/rewrite-subdomain-to-main-domain-without-redirect-with-htaccess) – Mark Jun 17 '21 at 03:40
  • No, that post is changing the place of the subdomain and I don't want that, instead I just want to have an impact of the rewriting on the subdomain content and not the position of the subdomain. – Abdul Muhamin Rehman Jun 19 '21 at 05:39

2 Answers2

1

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.

Marcel Burkhard
  • 3,453
  • 1
  • 29
  • 35
0

You can setup wildcard subdomain.

Check this, if it helps for you.

https://stackoverflow.com/a/758383/11426374