Need an HTACCESS file written

Discussion in 'Site & Server Administration' started by Hotelsex, Nov 24, 2010.

  1. #1
    Hello

    i am in the process of moving my websiteto a new domain name... but i don't want to be
    (1) - penalized for duplicate content .. and
    (2) - don't want to lose all the traffic and work i have done building the (soon-to-be) abandoned site so i would like all traffic forwarded over to the new one.

    I need a nice, seo friendly HTACCESS file written the right way (nothing shady)
    (for some reason, i struggle with these)


    For those that specialize in this field, this is a rather easy task...
    .. can someone please help ... i will pay if necessary.

    Please let me know as soon as possible.

    Thank You!!

    - jv
     
    Hotelsex, Nov 24, 2010 IP
  2. The_Hatta

    The_Hatta Greenhorn

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    RewriteEngine On

    RewriteBase /
    RewriteCond %{REQUEST_URI} !^/
    RewriteCond %{HTTP_HOST} ^[www\.]oldsite\.com/$1
    RewriteRule ^(.*)$ http://www.newsite.net/$1 [R=301,L]

    redirect All people - and tells them 301 - or Permanent Move to the new location

    Hope it helps :)
     
    The_Hatta, Nov 24, 2010 IP
  3. Hotelsex

    Hotelsex Peon

    Messages:
    539
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hello hatta and thanks for the reply.

    .. and while i found what i was looking for, i was wondering if you could tell me the difference between your script and the one that i actually used (pro / con)


    "Redirect 301 / http://www.newsite.com/"


    thanks again
     
    Hotelsex, Nov 25, 2010 IP
  4. madaboutlinux

    madaboutlinux Member

    Messages:
    250
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    43
    #4
    "hatta's" rules will check the incoming request and depending on the "RewriteCond" it will act upon it while your "Redirect" rule will simply forward all requests to the newsite.
     
    madaboutlinux, Nov 26, 2010 IP
  5. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #5
    I too require something like the above code, however is the above code will redirect an article abcd.co.in/article1 to abcd.in/article1 ? Please help me out, I'm not able to figure out the exact code.

    Thanks
     
    radiant_luv, Nov 30, 2010 IP
  6. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #6
    you should look into google webmaster tools "site's domain change" (or something like that) option
     
    atxsurf, Dec 1, 2010 IP