Page 6 of 18 FirstFirst 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 LastLast
Results 76 to 90 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; [L] means "last rule to process", i.e. do not apply other rewrite rules if this one matches....

  1. #76
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    [L] means "last rule to process", i.e. do not apply other rewrite rules if this one matches.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  2. #77
    Member
    Real Name
    Nathan
    Join Date
    Mar 2009
    Posts
    73
    Liked
    0 times
    I completed the redirect of example.com to www.example.com/

    I did not see how to automatically put a www.example.com/index.php to www.example.com/ can you please tell me how to do this?

  3. #78
    Senior Member Shadab's Avatar
    Real Name
    Shadab
    Join Date
    Oct 2007
    Location
    Bhopal
    Posts
    821
    Liked
    0 times
    Blog Entries
    12
    @breakpoint: If you have your forum in root too, you can define the homepage aliases as :
    Code:
    index.php
    index.php?
    in your vbseocp.
    Otherwise, you can setup this .htaccess redirect rule in root:
    Code:
    RewriteCond %{THE_REQUEST} /index\.php\ HTTP/
    RewriteRule ^index\.php$ / [R=301,L]

  4. #79
    Senior Member f4vn's Avatar
    Real Name
    Lam AJ
    Join Date
    Nov 2007
    Posts
    107
    Liked
    5 times
    I have tried this on my other site which doesn`t use vbseo.
    Code:
    RewriteCond %{THE_REQUEST} /index\.php\ HTTP/
    RewriteRule ^index\.php$ / [R=301,L]
    But it hasn`t worked with "index.php?".

  5. #80
    Junior Member
    Real Name
    Joakim Andreassen
    Join Date
    May 2008
    Posts
    22
    Liked
    0 times
    Ok, this only affects the homepage, how can you make it so that http://www.example.com/forum1/thread1 becomes http://example.com/forums1/thread1 ?

  6. #81
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    22,367
    Liked
    542 times
    Blog Entries
    4
    When you set it as explained in first post , it is set to redirect www.domain.com to domain.com globally for all internal sub pages.
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  7. #82
    Junior Member
    Real Name
    bijju
    Join Date
    Mar 2008
    Posts
    24
    Liked
    0 times
    good post but i am getting error Part of the process of setting a preferred domain is to verify that you own http://mydomain.com/. Please verify http://mydomain.com/.
    i want to verify. google says you need to add a template or meta tag. i added template. but it says google didn't find the template that i added

  8. #83
    Senior Member
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,097
    Liked
    4 times
    You should not be adding a template, you should be adding a .html file.
    The Forum Hosting - Forum Hosting from the Forum Experts

  9. #84
    Junior Member
    Real Name
    bijju
    Join Date
    Mar 2008
    Posts
    24
    Liked
    0 times
    Quote Originally Posted by Michael Biddle View Post
    You should not be adding a template, you should be adding a .html file.
    i added .html file, it still say cannot find the link. now i got new problem i cannot add my sitemap. it say 404page not found.

  10. #85
    Senior Member
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,097
    Liked
    4 times
    What link is the google page on your website? Link to it here.
    The Forum Hosting - Forum Hosting from the Forum Experts

  11. #86
    Junior Member
    Real Name
    bijju
    Join Date
    Mar 2008
    Posts
    24
    Liked
    0 times
    Quote Originally Posted by Michael Biddle View Post
    What link is the google page on your website? Link to it here.
    google4d3a562d931cfed3

  12. #87
    Senior Member
    Real Name
    Robert
    Join Date
    Jul 2009
    Posts
    140
    Liked
    0 times

    Smile

    My homepage is www.dumontnjforum.com (WordPress)
    My forums is www.dumontnjforum.com/forums

    Here's what I've come up with (in red):

    # 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\.dumontnjforum\.com
    RewriteRule (.*) http://www.dumontnjforum.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]


    Did I do it right and place it in the right spot/position?

    And, what about this line RewriteCond %{REQUEST_URI} forum/?
    This is for a trailing slash. Do I/Should I use it?

    Thanks!!

  13. #88
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    22,367
    Liked
    542 times
    Blog Entries
    4
    You are using it correct
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  14. #89
    Member
    Real Name
    Jeff
    Join Date
    Jul 2009
    Posts
    31
    Liked
    0 times
    Just set mine up for the good ole' www. Tested it and it works like a charm!!

  15. #90
    Member
    Join Date
    Jan 2006
    Posts
    31
    Liked
    0 times
    sorry for my dumb question. but i have several urls for my website
    how do i for example 301 redirect
    www.mysite .org to www.mysite. com ?

    thank you so much in advance!

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