Connect with Facebook
Go Back   vBulletin Setup > vBulletinSetup Information > vBulletin Hacks & Questions


Please Register to get full access to the forums.
Reply
 
LinkBack Thread Tools Display Modes
Old 07-23-2008, 10:53 AM   #1
vBulletin Owner
 
Luigi's Avatar
 
Join Date: Oct 2007
Posts: 397
Luigi has a spectacular aura about
Site doesn't load without the "www" in front...

In firefox, the homepage of the site loads fine with or without the www in front of the http://

In Internet Explorer, when you don't type the prefix "www" I noticed the homepage fails to load....resulting in a page not found, google search.

What is the issue, and how do I fix it (examples)? I want to save my precious page rank by condensing all non-www to www prefixes.

Thanks,

-Luigi

Last edited by Luigi; 07-23-2008 at 05:04 PM. Reason: spelling
Luigi is offline   Reply With Quote
Old 07-23-2008, 11:16 AM   #2
vBulletin Owner
 
Soliloquy's Avatar
 
Join Date: Jun 2007
Location: New York City
Posts: 2,693
Recipes: 60
Soliloquy is a jewel in the rough
Re: Site doesn't load without the "www" in front...

This is probably something your host neglected to set up. If they don't fix it for you try adding this to your .htaccess:

Quote:
RewriteEngine On

RewriteCond %{HTTP_HOST} ^(?<!www.)([a-z]+.com)$ [NC]
RewriteRule /(.*) http://www.%1/$1 [R=permanent,L]
__________________
Science Chats | Disabled NYC | The Chic Petite
Soliloquy is offline   Reply With Quote
Old 07-23-2008, 04:02 PM   #3
vBulletin Owner
 
Luigi's Avatar
 
Join Date: Oct 2007
Posts: 397
Luigi has a spectacular aura about
Re: Site doesn't load without the "www" in front...

Okay thanks..I think I fixed it the prefix issue...but now I want to save my precious page rank by condensing/redirecting all non-www to www prefixes.

How do you get the site redirected so that it always goes to a domain with a www? For example user types in "google.com" in URL bar, and after hitting enter, they will see "www.google.com" in the URL field.

Here's the code that's in my .htacess which is located in my forum folder (public_html/forum/.htaccess)

Code:
# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
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 /

#RewriteCond %{HTTP_HOST} !^www.domain.com
#RewriteRule (.*) http://www.domain.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]

-Luigi

Last edited by Luigi; 07-23-2008 at 05:05 PM.
Luigi is offline   Reply With Quote
Old 07-23-2008, 04:20 PM   #4
Supporters
vBulletin Owner
 
Cerberus's Avatar
 
Join Date: Mar 2008
Posts: 1,320
Cerberus is just really niceCerberus is just really niceCerberus is just really nice
Re: Site doesn't load without the "www" in front...
Recent Blog: Free T shirt

Code:
#RewriteCond %{HTTP_HOST} !^www.domain.com
#RewriteRule (.*) http://www.domain.com/forum/$1 [L,R=301]
Just change the .domain.com to whatever your site is
__________________
Cerberus is offline   Reply With Quote
Old 07-23-2008, 04:57 PM   #5
vBulletin Owner
 
Luigi's Avatar
 
Join Date: Oct 2007
Posts: 397
Luigi has a spectacular aura about
Re: Site doesn't load without the "www" in front...

Per your directions, I enter my site url to replace "www.domain.com" above and removed the # sign.

However, when I enter just "mysite.com" in the URL, it just shows up as http://mysite.com....

Also, now if i type in http://mysite.com/forum I get a 404...

What gives?

-Luigi

Last edited by Luigi; 07-23-2008 at 05:00 PM.
Luigi is offline   Reply With Quote
Reply

Tags
front, load, seovb, site, www

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Front page", or straight to forums? Soliloquy Community Forum Management 5 07-15-2008 01:51 PM
"forum", "forums", "talk" etc... what do people search for? Soliloquy vBulletin SEO Tips and SEO Questions 2 07-14-2008 10:21 AM
Replacing bullets ">" in portal's site nav? Luigi vBulletin Hacks & Questions 2 11-02-2007 10:05 PM


All times are GMT -6. The time now is 11:54 PM.

vBulletin Setup, vBulletin Setup Forums, vBulletin Services, vBulletin Blogs, vBulletin SEO, vBulletin Questions
vBulletin Skins, Styles, Templates, vBulletin Monetization, Blogs, vBulletin Link Directory,Quality Link Directory