I have one domain name, let's say its example.org, and on this domain I use lots of folders as well as sudomains:
sub1.example.org/folder1
www.example.org/folder2
sub2.example.org/folder3
In addition to example.org, I have several other domain variations:
example.com
exampel.org
exampel.com
What I want to do is to forward any traffic from one of these typo domains to the proper file in the correct subfolder/folder.
I'm thinking I need to setup a folder on my hosting account that all the typo domains point to, (outside of the folder where I host example.org). Then, I need to go through each typo domain and create wildcard subdomains.
I guess inside this folder, I need something like an .htaccess file that detects the subdomain, folder, and file path being requested, correct the domain to example.org, and use a 301 redirect to move the user to the correct location.
Would this be the best approach, or is there something better to do?
I understand that if the user types in randomsub.exampel.com/randomfolder that they would be redirected to randomsub.example.org/randomfolder, where their request will fail, but I would rather it fail on the correct domain than have some kind of filtering/error system on the typo domain.
Also, what would be the best approach to handle email settings on the typo domains? Would I change MX records, or anything?
Thanks