Page 2 of 18 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... LastLast
Results 16 to 30 of 267
Like Tree3Likes

[How to] Setup www.yourdomain.com or yourdomain.com (www vs. non-www) - With .htaccess 301 redirects

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; This one is different the one that is in the .htaccess file in /forum that came with vbseo Code: RewriteCond ...

  1. #16
    Senior Member Julio's Avatar
    Real Name
    Julio
    Join Date
    Aug 2006
    Location
    Bronx, NY
    Posts
    312
    Liked
    0 times
    This one is different the one that is in the .htaccess file in /forum that came with vbseo

    Code:
    RewriteCond %{HTTP_HOST} ^www\.example\.com$
    RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
    How can i make the one that came with vbseo redirect to http://domain.com ?

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

  2. #17
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hello,

    the code would be:
    Code:
    RewriteCond %{HTTP_HOST} !^yourdomain\.com
    RewriteRule (.*) http://yourdomain.com/forum/$1 [L,R=301]
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #18
    Senior Member Julio's Avatar
    Real Name
    Julio
    Join Date
    Aug 2006
    Location
    Bronx, NY
    Posts
    312
    Liked
    0 times
    Thanks oleg,

  4. #19
    Senior Member
    Real Name
    Chris Powell
    Join Date
    Dec 2006
    Location
    UK
    Posts
    129
    Liked
    0 times
    hi for the main domain name ive put the redirect code in htaccess so non-www goes to www but how about the forums...or is it only need with the main domain name?

  5. #20
    Senior Member
    Real Name
    Joseph Ward
    Join Date
    Jun 2005
    Posts
    23,847
    Liked
    33 times
    Blog Entries
    9
    If your forum is located in a sub-folder, then nothing additional is required.

  6. #21
    Junior Member
    Real Name
    azyya
    Join Date
    Apr 2008
    Posts
    10
    Liked
    0 times
    thanks

  7. #22
    Junior Member
    Real Name
    Niti Rungrojchai
    Join Date
    Apr 2008
    Posts
    1
    Liked
    0 times
    Thank you

  8. #23
    Junior Member
    Real Name
    bernie
    Join Date
    Jan 2008
    Posts
    1
    Liked
    0 times
    Ive set this up in the .htaccess file in the forum folder however some users are experiencing 404 pages when browsing. It occasionally happens when a user logins with incorrect password. Or when a user clicks home from a forum thread.

    Don't seem to get the issue myself anymore but when I type in http://mywebsite.com/forum
    it wont show the forum redirects to http://www.mywebsite.com/forums//web...ite.com/forums
    (which is a 404 not found page)


    However if I type in http://mywebsite.com/forum/ it redirects to http://www.mywebsite.com/forum/ fine.
    Last edited by bernie; 05-05-2008 at 06:26 PM.

  9. #24
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Hello,

    replied to your ticket.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  10. #25
    Junior Member djawir's Avatar
    Real Name
    Adri
    Join Date
    Feb 2008
    Location
    Indonesia
    Posts
    24
    Liked
    0 times
    how to setup using sub domain?
    Code:
    i am used http://forum.djawir.com
    i want redirect from http://www.forum.djawir.com to http://forum.djawir.com
    its corect or not
    Code:
    RewriteCond %{HTTP_HOST} !^www\.forum.djawir\.com
    RewriteRule (.*) http://forum.djawir.com/$1 [L,R=301]
    thanks
    Last edited by djawir; 05-25-2008 at 09:01 AM.

  11. #26
    Senior Member
    Real Name
    Riccardo
    Join Date
    Jun 2008
    Posts
    265
    Liked
    1 times
    Hi all, hi joe,
    what is the best choise for a not expert user like me?

    www or not www?

  12. #27
    Senior Member
    Real Name
    Alex
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    508
    Liked
    0 times
    yes good question, and if someone want to change his first choice, there is a bad impact in indexing?

  13. #28
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times

  14. #29
    Senior Member
    Real Name
    Alex
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    508
    Liked
    0 times
    i've tried to use the no www. but in my main site doesn't work
    Code:
    RewriteCond %{HTTP_HOST} ^www\.example\.com$
    RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
    in forum i use this htaccess code.

    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} !^example\.com
    RewriteCond %{REQUEST_URI} forum/
    RewriteRule (.*) http://example.com/forum/$1 [L,R=301]
    
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron)
    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]

  15. #30
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Did you update your forums URL in vB admincp options?
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


Page 2 of 18 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... LastLast

Similar Threads

  1. Urgent help with htaccess and 301 redirects
    By markbolyard in forum URL Rewrite Settings
    Replies: 4
    Last Post: 12-02-2007, 05:24 PM
  2. htaccess redirects when moving folder
    By I, Brian in forum Troubleshooting
    Replies: 3
    Last Post: 10-05-2007, 02:47 PM
  3. Help with initial htaccess setup
    By mhc1576 in forum URL Rewrite Settings
    Replies: 1
    Last Post: 12-28-2006, 07:44 AM
  4. Replies: 6
    Last Post: 10-23-2005, 01:32 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
  •