vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now! HACKER SAFE certified sites prevent over 99.9% of hacker crime.
ne nw
New vBSEO Discount Level for Network Builders Meet vBSEO Team in New York (Nov. 3rd & 4th) vBSEO 3.2.0 GOLD Has Landed Success with vBSEO = 600ore Web Visitors + $1400 in a Day! Crawlability Inc. Files for SEO Technology Patent
se sw

.htaccess Question RE: www and no www

This is a discussion on .htaccess Question RE: www and no www within the General Discussion forums, part of the vBSEO SEO Plugin category; Hello, My site has a .htaccess in the root which redirects calls to stop SE's thinking I have duplicate content ...

Go Back   vBulletin SEO Forums > vBSEO SEO Plugin > General Discussion

Enhancing 80 million pages.

Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
  #1  
Old 11-19-2007, 02:47 PM
Member
 
Real Name: Mike
Join Date: Jun 2007
Location: UK
Posts: 46
Post .htaccess Question RE: www and no www

Hello,

My site has a .htaccess in the root which redirects calls to stop SE's thinking I have duplicate content

Code:
 
# Rule for duplicate content removal : domain.com - Get online with a domain name and web hosting vs domain.com
# RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
# RewriteRule (.*)$ Website Hosting - Mysite.com [R=301,L,NC]
I also have the VBSEO .htaccess installed part of which does the same thing

Code:
 
RewriteCond %{HTTP_HOST} !^www\.mysite\.com
RewriteRule (.*) Website Hosting - Mysite.com [L,R=301]
The two dont seem to coexist

This means that my main html site no longer has the redirect working :(

Can anybody tell me how I could get both redircts working?

Thanks

VinylJunky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 11-19-2007, 04:07 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer SupportvBSEO Documenter
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 21,450
Blog Entries: 1
You should remove "#" characters for rewrite rules in domain root since they are used to disable (comment out) directives.
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 11-19-2007, 05:18 PM
Member
 
Real Name: Mike
Join Date: Jun 2007
Location: UK
Posts: 46
Quote:
Originally Posted by Oleg Ignatiuk View Post
You should remove "#" characters for rewrite rules in domain root since they are used to disable (comment out) directives.
I added the # to stop the rewrite working because if it runs it causes problems.

The one in my site root used to work until I activated the VBSEO one in the forum root :(

Sorry for the confussion.

Any ideas how I get them both working?

Thanks

VinylJunky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 11-19-2007, 05:23 PM
Keith Cohen's Avatar
vBSEO Staff
vBSEO Total Customer SupportBig Board Administrator
 
Real Name: Keith Cohen
Join Date: Jul 2005
Location: Raleigh, NC USA
Posts: 6,265
Blog Entries: 1
In your case, you would have this in the .htaccess in your forum root:

RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteRule (.*) http://www.yourdomain.com/forum/$1 [L,R=301]

That should not affect anything in your site root, however.
__________________
Keith Cohen / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.


My Personal Sites: My Blog | GPS Discussion Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 11-20-2007, 05:44 AM
Member
 
Real Name: Mike
Join Date: Jun 2007
Location: UK
Posts: 46
Seems to work fine

Thanks


VinylJunky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 11-23-2007, 06:33 AM
Member
 
Real Name: Mike
Join Date: Jun 2007
Location: UK
Posts: 46
Question

I have found a small problem


.mysitez.com gets refered to www.mysitez.com

.mysitez.com/forum/ gets refered to www.mysitez.com/forum

.mysitez.com/forum doesnt refer to www.mysitez.com/forum it stays at .mysitez.com/forum and shows Page Cannot Be Found 404

How weird

Anybody any ideas?

Thanks

VinylJunky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 11-23-2007, 06:50 AM
Thomas Hoehl's Avatar
vBSEO Staff
 
Real Name: Thomas
Join Date: Jul 2005
Location: Kempen, Germany
Posts: 765
Try this (in Root folder, not forum folder)

Code:
RewriteCond %{HTTP_HOST} !^www\.mysitez\.com$ [NC]
RewriteRule ^(.*)$ http://www.mysitez.com$1 [R=301,L]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 11-23-2007, 10:24 AM
Member
 
Real Name: Mike
Join Date: Jun 2007
Location: UK
Posts: 46
Quote:
Originally Posted by Thomas Hoehl View Post
Try this (in Root folder, not forum folder)

Code:
RewriteCond %{HTTP_HOST} !^www\.mysitez\.com$ [NC]
RewriteRule ^(.*)$ http://www.mysitez.com$1 [R=301,L]
I've given it a go but I still get the same result

Im puzzled :(

VinylJunky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 11-23-2007, 10:31 AM
Thomas Hoehl's Avatar
vBSEO Staff
 
Real Name: Thomas
Join Date: Jul 2005
Location: Kempen, Germany
Posts: 765
Have you dissable it in the .htaccess File in "Forum root" (forum Folder) at the same time?

T
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 11-23-2007, 10:32 AM
Keith Cohen's Avatar
vBSEO Staff
vBSEO Total Customer SupportBig Board Administrator
 
Real Name: Keith Cohen
Join Date: Jul 2005
Location: Raleigh, NC USA
Posts: 6,265
Blog Entries: 1
Quote:
Originally Posted by VinylJunky View Post
I have found a small problem


.mysitez.com gets refered to www.mysitez.com

.mysitez.com/forum/ gets refered to www.mysitez.com/forum

.mysitez.com/forum doesnt refer to www.mysitez.com/forum it stays at .mysitez.com/forum and shows Page Cannot Be Found 404

How weird

Anybody any ideas?

Thanks

VinylJunky
Try this: Add www to forum url with no trailing slash
__________________
Keith Cohen / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.


My Personal Sites: My Blog | GPS Discussion Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11  
Old 11-23-2007, 11:48 AM
Member
 
Real Name: Mike
Join Date: Jun 2007
Location: UK
Posts: 46
I still get this behaviour

.mysitez.com gets refered to www.mysitez.com

.mysitez.com/forum/ gets refered to www.mysitez.com/forum

.mysitez.com/forum doesnt refer to www.mysitez.com/forum

I'd like .mysitez.com/forum to go to www.mysitez.com/forum

These are my .htaccess files


siteroot/.htaccess
Code:
#  mod_rewrite in use
# Options +FollowSymlinks
RewriteEngine On
#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
# RewriteBase /
# Rule for duplicate content removal : domain.com - Get online with a domain name and web hosting vs domain.com
 
RewriteCond %{HTTP_HOST} !^www.mysitez.com$ [NC]
RewriteRule ^(.*)$ http://www.mysitez.com$1 [R=301,L]
 
# Rule to redirect sitemaps
RewriteRule ^((urllist|sitemap).*.(xml|txt)(.gz)?)$ forum/vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
 
# ErrorDocument 404 http://www.mysitez.com/error404.htm 

/forum .htaccess
Code:
 
RewriteEngine On
# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
# RewriteBase /forum/
# Already stated in site root
# RewriteCond %{HTTP_HOST} !^www.mysitez.com
# RewriteRule (.*) http://www.mysitez.com/forum/$1 [L,R=301]
 
RewriteRule ^((urllist|sitemap_).*.(xml|txt)(.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
RewriteRule ^(.*.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !.(jpg|gif)$
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]
Its driving me nuts

Thanks

VinylJunky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12  
Old 11-23-2007, 11:52 AM
Keith Cohen's Avatar
vBSEO Staff
vBSEO Total Customer SupportBig Board Administrator
 
Real Name: Keith Cohen
Join Date: Jul 2005
Location: Raleigh, NC USA
Posts: 6,265
Blog Entries: 1
It looks like you didn't do what is suggested here: Add www to forum url with no trailing slash

That needs to be done in your Forum .htaccess, and you will need to uncomment those lines.
__________________
Keith Cohen / Crawlability Inc.
vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations

vBSEO Google Sitemap Generator - Version 2.2 Released Mandatory Upgrade for vBSEO 3.2.0 GOLD

6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You.


My Personal Sites: My Blog | GPS Discussion Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13  
Old 11-23-2007, 12:24 PM
Member
 
Real Name: Mike
Join Date: Jun 2007
Location: UK
Posts: 46
Quote:
Originally Posted by Keith Cohen View Post
It looks like you didn't do what is suggested here: Add www to forum url with no trailing slash

That needs to be done in your Forum .htaccess, and you will need to uncomment those lines.
Guys,

It works now, I owe you a beer

I added this line to forum/.htaccess
RewriteCond %{REQUEST_URI} forum/

Thank you, I can now stop banging my head on the keyboard.

The help I get in this forum is exceptional

VinylJunky
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14  
Old 11-23-2007, 01:14 PM
Thomas Hoehl's Avatar
vBSEO Staff
 
Real Name: Thomas
Join Date: Jul 2005
Location: Kempen, Germany
Posts: 765
You welcome.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:55 PM.


Powered by vBulletin Version 3.8.0 Beta 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.5 ©2008, Crawlability, Inc.