Results 1 to 9 of 9

mustangevolution.com/forum --> www.mustangevolution.com/forum

This is a discussion on mustangevolution.com/forum --> www.mustangevolution.com/forum within the General Discussion forums, part of the vBSEO SEO Plugin category; What do I need to place in my /forum/ .htaccess to make it redirect mustangevolution.com/forum to www.mustangevolution.com/forum ?...

  1. #1
    Senior Member BamaStangGuy's Avatar
    Real Name
    Brent Wilson
    Join Date
    Aug 2005
    Location
    Huntsville, Alabama
    Posts
    2,483
    Liked
    0 times

    mustangevolution.com/forum --> www.mustangevolution.com/forum

    What do I need to place in my /forum/ .htaccess to make it redirect mustangevolution.com/forum to www.mustangevolution.com/forum ?

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

    the following rewrite rule should work (right after "RewriteEngine on" line):
    RewriteCond %{HTTP_HOST} !^www\.mustangevolution\.com
    RewriteRule ^(.*)$ http://www.mustangevolution.com/forum/$1 [L,R=301]
    Last edited by Oleg Ignatiuk; 03-14-2006 at 06:26 AM.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  3. #3
    Senior Member BamaStangGuy's Avatar
    Real Name
    Brent Wilson
    Join Date
    Aug 2005
    Location
    Huntsville, Alabama
    Posts
    2,483
    Liked
    0 times
    That didnt work. Suppose to place it in the /forum/.htaccess file right?

    http://mustangevolution.com/forum does not redirect to http://www.mustangevolution.com/forum if I use that

  4. #4
    vBSEO Staff Ace Shattock's Avatar
    Real Name
    Ace Shattock
    Join Date
    Jul 2005
    Location
    Auckland, New Zealand, New Zealand
    Posts
    3,999
    Liked
    11 times
    RewriteCond %{HTTP_HOST} !^www\.mustangevolution\.com [NC]
    RewriteRule ^(.*) http://www.mustangevolution.com/$1 [L,R=301]
    You would need to put that in each .htaccess in the directories you want it to work in.

    (Thats my one from nzboards, with your domain...can someone explain if having [NC] there is a good idea?)

    *edit* Oleg, is that \ meant to be in the last line after the hat (^)?

  5. #5
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Oh, yes - there is an extra slash character inserted, it should be removed
    (I've corrected my post above)
    Suppose to place it in the /forum/.htaccess file right?
    Yes, that's right.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  6. #6
    Senior Member BamaStangGuy's Avatar
    Real Name
    Brent Wilson
    Join Date
    Aug 2005
    Location
    Huntsville, Alabama
    Posts
    2,483
    Liked
    0 times
    Thanks that worked Oleg

  7. #7
    vBSEO Staff Ace Shattock's Avatar
    Real Name
    Ace Shattock
    Join Date
    Jul 2005
    Location
    Auckland, New Zealand, New Zealand
    Posts
    3,999
    Liked
    11 times
    If you have other .htaccess files in other directories, and you do not apply that piece of code to them, the files in those directories will not get the www added.

    Or am I wrong?

  8. #8
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,689
    Liked
    157 times
    Yes, this will be applied to the forum/ folder only (as specified in the thread subject).
    To redirect ANY URL rewrite rules from your post (#4) should be used. And [NC] means "case-insensitive comparison" .
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


  9. #9
    vBSEO Staff Ace Shattock's Avatar
    Real Name
    Ace Shattock
    Join Date
    Jul 2005
    Location
    Auckland, New Zealand, New Zealand
    Posts
    3,999
    Liked
    11 times
    Thank you for the NC clarification Oleg!

    (And... I really should pay more attention. :P )

Posting Permissions

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