I'm fighting a losing battle over here. I've got an easily misspelled domain name. So I purchased the misspelling. Now, I need to setup the misspelled domain name to redirect everything to the properly spelled domain name, but I need to keep the subdomains.
Example: support.domane.com should redirect to support.domain.com submit.domane.com should redirect to submit.domain.com
I already have a dozen or so subdomains setup for my domain, and I foresee many additional ones in the future. I would really rather not have to input them multiple times across multiple domains.
And I'd really like to have a landing page with a link, just in case the redirect doesn't work. Like an "Update your bookmarks!!1!" page. So, if a solution involves php or javascript, I'm all over that as well.
Any advice would be greatly appreciated.
Thanks in advance,
Critologist
tl;dr I need to redirect domains but keep subdomains intact. http://sub.domane.com -> http://sub.domain.com where sub is a variable and needs to be the same on both URLs.
This might help:
https://stackoverflow.com/questions/79764/wildcard-subdomains
What you want is a wildcard DNS A record entry for:
pointing to your webserver.
On the webserver, you want a rewriting engine correcting the misspelling and serving up a 301 redirect to subdomain.correct.com. How depends on what you're running on the server side, but Apache Rewrite rules are common.
I don't know of a way you can also serve up a link - what kind of browser doesn't support redirects? Perhaps if you do it in PHP or similar you can send a redirect response header and a page with a link? Not sure if that can work. - examples: http://www.webconfs.com/how-to-redirect-a-webpage.php
(Assuming apache is the web server.)
Create a default VHOST with
In
foo.php
do something like (I don't know php so there is psuedocode):301/302 redirects work and have worked for a long time.
If you insist though you could return a page that has a link to the non-typo domain and use a
meta http-equiv="refresh"
or a javascript reload but that is so 1996.