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
2
- 1Does this answer your question? Rewrite subdomain to main domain without redirect with htaccessMark– Mark2021-06-17 03:40:48 +00:00Commented Jun 17, 2021 at 3: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– Abdul Muhamin Rehman2021-06-19 05:39:30 +00:00Commented Jun 19, 2021 at 5:39
Add a comment |
2 Answers
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.
2 Comments
Abdul Muhamin Rehman
well I can change example-domain.com/index.php by rewriting url, isn't it possible for sudomain part as well ???
Marcel Burkhard
If the subdomain points to your server too, maybe. But from your question I thought it doesn't.
You can setup wildcard subdomain.
Check this, if it helps for you.