[HELP] redirect subdomain

fsatark

Junior Member
Joined
Aug 25, 2012
Messages
147
Reaction score
31
Hi
I just realize that G00gl3 index a version of my domain that doesn't exist!
My domain is "www.myDomain.com" and G00gl3 has index a version with only one "w" -> "w.myDomain.com" !!!!!
If you click this result from G00gl3 search results page you get a 404 error.
I do a search on how to redirect using .htaccess and i try several methods but I can't get any results.
I also create (using my hosting CP - cPanel) a "real" subdomain with only one "w" and i choose to redirect it permanently to "www.myDomain.com" still without success, i always get an 404 error.
Any ideas?
 
Try in your .htaccess
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^w.yourdomain.com$ [NC]
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
all the best :)
 
Thank you for your answer. Unfortunately doesn't work...
I had already use this code (or a variation very close) among 10ths of solutions i found searching, but i can't redirect.
 
Thank you for your answer. Although i redirect the "w.mydomain.com" tp "www.mydomain.com" via cPanel, i don't have any success.
For this project, in order to avoid footprint, i don't us GWT for this domain.
Thank you anyway.
 
This may be a silly solution but:
* Create subdomain
* Put index.html on subdomain with text "Redirecting"
* Confirm link to work
* Meta refresh on page to main page

Should work said the noob and cheered. :D
 
Last edited:
Back
Top