Results 1 to 2 of 2

htaccess rewrite thoughts

This is a discussion on htaccess rewrite thoughts within the General Discussion forums, part of the vBulletin SEO Discussion category; If I want to redirect every instance of and all files/folders http://mydomain.com to http://www.mydomain.com Would I do this like this? ...

  1. #1
    Member
    Real Name
    sfnet
    Join Date
    Aug 2007
    Posts
    73
    Liked
    0 times

    htaccess rewrite thoughts

    If I want to redirect every instance of and all files/folders

    http://mydomain.com

    to

    http://www.mydomain.com

    Would I do this like this?

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
    RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]

    Is this a good idea from an SEO perspective?

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

    yes, the code is correct and this is recommended from SEO point of view.
    Oleg Ignatiuk / Crawlability Inc.
    vBSEO 3.6.0 GOLD Released!
    Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!


Similar Threads

  1. Syntax for Custom Rewrite Rules
    By Joe Ward in forum Custom Rewrite Rules
    Replies: 33
    Last Post: 02-10-2011, 09:49 PM
  2. Manual Rewrite in Htaccess file
    By sfnet in forum General Discussion
    Replies: 2
    Last Post: 09-23-2007, 06:50 AM
  3. Full vBulletin Rewrite System
    By Snake in forum Custom Rewrite Rules
    Replies: 13
    Last Post: 06-05-2007, 11:42 PM
  4. htaccess rewrite rule for non vbseo page
    By Pat in forum Custom Rewrite Rules
    Replies: 10
    Last Post: 09-19-2006, 03:05 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
  •