Page 3 of 18 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... LastLast
Results 31 to 45 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; yes but doesn't work on main site...

  1. #31
    Senior Member
    Real Name
    Alex
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    508
    Liked
    0 times
    yes but doesn't work on main site

  2. #32
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    You should create a separate .htaccess in domain root for that.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #33
    Senior Member
    Real Name
    Alex
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    508
    Liked
    0 times
    i have already 2 .htaccess files, 1 domain root - 1 forum root

  4. #34
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    What is your domain root .htaccess? Do I understand correctly that it's top domain URL is not redirected?
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  5. #35
    Senior Member
    Real Name
    Alex
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    508
    Liked
    0 times
    the top domain is not redirected and in the forum our members have problems to log in

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.player-art\.com$
    RewriteRule ^(.*)$ http://player-art.com/$1 [L,R=301]

  6. #36
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Please open a ticket with ftp access for troubleshooting.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  7. #37
    Senior Member
    Real Name
    Alex
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    508
    Liked
    0 times
    Ok open

    Thanks

  8. #38
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Update: the issues fixed by changing Wordpress URL to non-www domain as well.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  9. #39
    Junior Member
    Real Name
    Phil
    Join Date
    May 2008
    Posts
    26
    Liked
    0 times
    Hello,

    I'm having trouble with this, I have
    Code:
    ##AddType application/x-httpd-php5 .php
    
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.jeep-cj\.com
    RewriteRule (.*) http://www.jeep-cj.com/$1 [R=301,L]
    in the web root and
    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\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.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)
    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]
    in the forum root. The rewrite works for the root pages rewrites
    Code:
    jeep-cj.com to www.jeep-cj.com
    but does not work in pages below the root such as the forums
    Code:
    jeep-cj.com/forums DOES NOT rewrite to www.jeep-cj.com/forums
    Any advice would be apreciated.

    Thanks,

  10. #40
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    In forums/.htaccess you should find:
    Code:
    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]
    and replace with:
    Code:
    RewriteCond %{HTTP_HOST} !^www\.jeep-cj\.com
    RewriteRule (.*) http://www.jeep-cj.com/forums/$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!


  11. #41
    Junior Member
    Real Name
    Phil
    Join Date
    May 2008
    Posts
    26
    Liked
    0 times
    Quote Originally Posted by Oleg Ignatiuk View Post
    In forums/.htaccess you should find:
    Code:
    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]
    and replace with:
    Code:
    RewriteCond %{HTTP_HOST} !^www\.jeep-cj\.com
    RewriteRule (.*) http://www.jeep-cj.com/forums/$1 [L,R=301]
    After trying that, the page
    Code:
    jeep-cj.com/forums
    still does not rewrite to
    Code:
    www.jeep-cj.com/forms
    - it still stays the same. I have tried a new browser and refreshing the pages. Still will not add the www to the link.

    I thought that the rewrite in the root public_html directory was recursive, but it seems that that is not so.

    Very frustrating... Ideas?

    Thanks,

  12. #42
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    What is your .htaccess file in forums/ folder now?
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  13. #43
    Junior Member
    Real Name
    Phil
    Join Date
    May 2008
    Posts
    26
    Liked
    0 times
    Per the first post (in the instruction of this thread) I made it
    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.jeep-cj\.com
    RewriteRule (.*) http://www.jeep-cj.com/$1 [R=301,L]
    Root folder.

    Thanks for the help...

  14. #44
    Junior Member
    Real Name
    Phil
    Join Date
    May 2008
    Posts
    26
    Liked
    0 times
    Sorry - you said forums folder...
    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\.jeep-cj\.com\forums\
    #RewriteRule (.*) http://www.jeep-cj.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)
    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. #45
    Junior Member
    Real Name
    Phil
    Join Date
    May 2008
    Posts
    26
    Liked
    0 times
    Sorry, I'm feeling pretty dumb right now... I had forgot to uncomment it out...

    It works now.

    So, help understand a little here.

    The root .htacess file is NOT recursive?

    I will need to add a seperate .htacess file for all the folders I want to rewrite and add www?

    Thanks,

Page 3 of 18 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... 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
  •