Go Back   vBulletin Setup > vBulletinSetup Information > vBulletin Questions


Please Register to get full access to the forums.
Post New Thread  Reply



#1   07-23-2008, 10:53 AM
Luigi has a spectacular aura about Join Date: Oct 2007 Posts: 397
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
Quote   |  



#2   07-23-2008, 11:16 AM
Soliloquy has a spectacular aura about Join Date: Jun 2007 Posts: 2,577 Location: New York City
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
Quote   |  



#3   07-23-2008, 04:02 PM
Luigi has a spectacular aura about Join Date: Oct 2007 Posts: 397
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.
Quote   |  



#4   07-23-2008, 04:20 PM
Blake2181 is a jewel in the rough Join Date: Mar 2008 Posts: 772
Re: Site doesn't load without the "www" in front...


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
--------------------
Argue Crazy
Got an opinion. Want to voice it?
Come argue with the best of them.
Quote   |  



#5   07-23-2008, 04:57 PM
Luigi has a spectacular aura about Join Date: Oct 2007 Posts: 397
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.
Quote   |  
Post New Thread  Reply
vBulletin Setup > vBulletinSetup Information > vBulletin Questions


Tags
seovb

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 Questions 2 11-02-2007 10:05 PM


All times are GMT -6. The time now is 12:42 AM.

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