I want to rewrite all Subdomains to main Domain with .htaccess. I found this Redirect any sub domain to a page on main domain, but does not work.
Not Found
The requested URL / was not found on this server.
I tried other ways also, but when I type some random subdomain sub.domain.com, then I see always this error.
Then I watched this Video https://www.youtube.com/watch?v=SoVcEqnqqbI and he makes same thing, what I need, but he has Wildacard Subdomains. I have not with my hosting Package Wildcard Subdomains. This is Apache Server with PHP 7.0.
Is there any way to do this without WIldarcards?
P.S. I need to rewrite and not Redirect. If User types sub.domain.com must stay on it, but see content same as on domain.com