Results 1 to 6 of 6

Why Homepage doesn't use WWW but other pages do?

This is a discussion on Why Homepage doesn't use WWW but other pages do? within the Troubleshooting forums, part of the vBSEO Google/Yahoo Sitemap category; hi, this is kinda driving me nuts. been searching and trying different things with .htaccess files but hope someone has ...

  1. #1
    Junior Member
    Real Name
    gchouse
    Join Date
    Nov 2010
    Posts
    3
    Liked
    0 times

    Question Why Homepage doesn't use WWW but other pages do?

    hi,

    this is kinda driving me nuts. been searching and trying different things with .htaccess files but hope someone has an idea.

    when i type in the address of the forum (ie http://www.website/forum), it magically redirects it to http://website.com/forum.

    but once you click to view a thread, it reverts back to the www version.

    only the forum home doesn't like the www.

    any ideas?

    thanks!

  2. #2
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Hello, welcome to vBSEO forums!.

    Can you please supply the code you have in your .htaccess?. It's likely you have the following:

    Code:
    RewriteCond %{HTTP_HOST} !^website\.com$
    RewriteRule ^(.*)$ http://website.com/forum/$1 [L,R=301]
    Or something similar. It should be:

    Code:
    RewriteCond %{HTTP_HOST} !^www\.website\.com
    RewriteRule (.*) http://www.website.com/forum/$1 [L,R=301]
    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


  3. #3
    Junior Member
    Real Name
    gchouse
    Join Date
    Nov 2010
    Posts
    3
    Liked
    0 times
    here's the .htaccess code in my root directory.

    Code:
    RewriteCond %{HTTP_HOST} !^www\.website\.com
    RewriteRule (.*) http://www.website.com/$1 [R=301,L]
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    and here's the .htaccess code in my forum directory that i was to upload from vbseo.

    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\.website\.com
    #RewriteRule (.*) http://www.website.com/forums/$1 [L,R=301]
    
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    if it helps..i noticed that....

    typing in http://www.website.com/forum - reverts to http://website.com/forum

    typing in http://www.website.com/forum/ - reverts to http://www.website.com/forum/

    so the trailing slash at the end seems to be related.

    i checked my admincp and the option for:

    URL of your forum.
    Note: do not add a trailing slash. ('/')

    there is no trailing slash as instructed.

    plus when i click on a thread, it reverts back to www so it's only the homepage of the forum that's being affected. but that's b/c there is a trailing slash at the end of each thread url.

    Thanks!

  4. #4
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Please try to change in your "forum/" .htaccess file:

    Find:
    Code:
    #RewriteBase /
    
    #RewriteCond %{HTTP_HOST} !^www\.website\.com
    #RewriteRule (.*) http://www.website.com/forums/$1 [L,R=301]
    Replace with:

    Code:
    RewriteBase /forum/
      
    RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
    RewriteRule (.*) http://www.yoursite.com/forum/$1 [L,R=301]
    Take care of replacing yoursite.com with your own domain.
    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


  5. #5
    Junior Member
    Real Name
    gchouse
    Join Date
    Nov 2010
    Posts
    3
    Liked
    0 times
    thank you. that solved the problem. just for reference...why was that necessary to add the code? i'm assuming majority of installs would work fine..but why was mine a bit different?

  6. #6
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    In some cases it's neccesary to enable RewriteBase due to that can be possible that are another users sharing your server, or in PHP configuration you have enabled doc_root directive.

    I'm glad the issue is fixed now!. Let me know if there's anything else I may help with.
    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


Similar Threads

  1. 00,000 Yahoo pages and 50,000 Google pages indexed
    By len backus in forum Analysis: Traffic & SERPS
    Replies: 6
    Last Post: 02-03-2010, 01:20 AM
  2. Duplicate pages with member pages
    By Noodles in forum Bug Reporting
    Replies: 1
    Last Post: 06-04-2009, 04:27 PM
  3. my pages indexed except my homepage
    By susanarend3 in forum General Discussion
    Replies: 12
    Last Post: 02-28-2009, 01:55 PM
  4. Setting a website homepage as a forum homepage
    By wld in forum Troubleshooting
    Replies: 3
    Last Post: 02-20-2009, 07:00 PM
  5. Homepage & Sitemap: Pages with duplicate meta descriptions
    By Marvin Hlavac in forum General Discussion
    Replies: 8
    Last Post: 12-12-2008, 03:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •