-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

2
  • 1
    Does this answer your question? Rewrite subdomain to main domain without redirect with htaccess Commented 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. Commented Jun 19, 2021 at 5:39

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

well I can change example-domain.com/index.php by rewriting url, isn't it possible for sudomain part as well ???
If the subdomain points to your server too, maybe. But from your question I thought it doesn't.
0

You can setup wildcard subdomain.

Check this, if it helps for you.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.