Hi, I would like to ask if its possible for me to reddirect all of my subdomains to my main domains. Etc: 1.example.com 2.example.com >>> up to 100.example.com and redirect it all to example.com Green awaits for those with an answer. Thanks a bunch
How to implement the 301 Redirect 1. To create a .htaccess file, open notepad, name and save the file as .htaccess (there is no extension). 2. If you already have a .htaccess file on your server, download it to your desktop for editing. 3. Place this code in your .htaccess file: redirect 301 /old/old.htm http://www.you.com/new.htm 4. If the .htaccess file already has lines of code in it, skip a line, then add the above code. 5. Save the .htaccess file 6. Upload this file to the root folder of your server. 7. Test it by typing in the old address to the page you've changed. You should be immediately taken to the new location.
Hi, thanks rep+ but can this work on subdomains I don't know. Meaning if people just press randomly http://123123.example.com how to make sure they will be redirected to example.com? Will this technique work?
The easiest way to achieve this is to setup Wildcard Subdomain http://steinsoft.net/index.php?site=programming/articles/apachewildcarddomain it comes down to this that each subdomain will redirect to your main site.