Can someone tell me how to redirect all pages from www. to non www version of my website ? mybetinfo.net is the website, now i can access with www and without www ... i guess htis i not good at all.
This is a discussion on [How to] Setup www.yourdomain.com or yourdomain.com (www vs. non-www) - With .htaccess 301 redirects within the General Discussion forums, part of the vBSEO SEO Plugin category; Can someone tell me how to redirect all pages from www. to non www version of my website ? mybetinfo.net ...
Can someone tell me how to redirect all pages from www. to non www version of my website ? mybetinfo.net is the website, now i can access with www and without www ... i guess htis i not good at all.
I like vbseo i use it on sports betting and whatafy.com
Please check first post of the thread. It has required code.
Mert Gökçeimam / Crawlability Inc.
vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!
Twitter:@Depkac
Personal Blog : Mert Gökçeimam
Forgive me maybe i'm complety blind, but there says pretty big ONLY for domain, i need for all pages, when i access www page to redircet me on non www version
Look i can access : Mybetinfo.net - Betsson - Be the expert !
and Mybetinfo.net - Betsson - Be the expert !
same last article one with www and another without, i need when i enter the url of www to redirect to non www, where to put the code and what code, please help me.
EDIT,
i edited htaccess and put those lines, seems is ok for articles to, i thought is only for main link, sorry about that.
I like vbseo i use it on sports betting and whatafy.com
It will cover EVERYTHING, so long as there's not another htaccess file below it, as that file will take over.
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
I use a WWW domain but I also setted up many subdomains (for CDN, for users, for blog.....) so I can't manually ad exception to htaccess for every new user that automatically gets its own subdomain. So I use thi rule to redirect only the second level domain (without www) to the www:
In this way:Code:# check to make sure it's not a www or subdomain request RewriteCond %{HTTP_HOST} ^([^.]+\.com) [NC] # if that's the case, redirect to www.HTTP_HOST RewriteRule (.*) http://www.%1/$1 [R=301,L]
site.com -> www.site.com
cdn.site.com->cdn.site.com
blog.site.com->blog.site.com
username.site.com->username.site.com
So only site.com is affected by this rule. Everything else pass.
If your forum is on a subdirectory:
www.site.com/forum
then you must add the name of the firectory in the last line:
(note the final slash)Code:# check to make sure it's not a www or subdomain request RewriteCond %{HTTP_HOST} ^([^.]+\.com) [NC] # if that's the case, redirect to www.HTTP_HOST RewriteRule (.*) http://www.%1/forum/$1 [R=301,L]
Bye
I have a 301 redirect, but I am still getting a 404 not found:
can someone help fix this:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^vipmoneymakersclub.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.vipmoneymakersclub.com$
RewriteRule ^(.*)$ "http\:\/\/www\.buyadtraffic\.com\/forum$1" [R=301,L]
when I click on a link from google and it tries to 301, it looks as if it is missing a forward slash.....
Mert Gökçeimam / Crawlability Inc.
vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!
Twitter:@Depkac
Personal Blog : Mert Gökçeimam
Hi,
Is there any benefit to using the method in post 1 to remove the www. over the method below?
Code:RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Hi Gary,
It may represent a problem if you would have a parked domain over your main one. I'm not quite sure if that code snippet 'eats' more resources than one one on the first post.
I'd recommend not to use it though.
Andrés Durán / Crawlability Inc.
ˇvBSEO 3.6.0 GOLD Liberado!
Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!
Síguenos en: Facebook | Síguenos en: Twitter
Just to ask.
If I use this code:
RewriteCond %{HTTP_HOST} ^www.site.com
RewriteRule (.*) http://site.com/$1 [R=301,L]
this would leave subdomains out of redirecting? As I specify www.site.com?
That says "if it starts with www ... move it to non-www"
No subdomains will hit the rule.
In general, you should use the negative case to block everything, and make exceptions for the ones that exist. See the 'Making Expceptions" heading in the first post.
Brian Cummiskey / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Be sure to check your .htaccess in case the code is already there. It was in mineMy site is indexed properly in Google as well.