Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: .htaccess - How to properly redirect a domain?

Hybrid View

  1. #1

    .htaccess - How to properly redirect a domain?

    Well, I've recently acquired a .org domain to redirect my .info

    palmbeachtravel(.)info >>> palmbeachtravel(.)org

    Now I need to get a proper redirect not to loose any traffic, rankings, bla bla... (bare in mind I get some good traffic from Google images that I don't want to waste)

    How can I do it using .htaccess ? (I believe it's the best way)

    Thx a lot!

  2. #2
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Could use this 301 redirect
    Code:
    Options +FollowSymLinks 
    RewriteEngine on 
    RewriteCond {HTTP_HOST} ^(www\.)?domain2\.info [NC] 
    RewriteRule ^(.*)$ http://www.domain1.org/$1 [R=301,L]
    That will redirect requests for files in www.domain2.info or domain2.info to the same files in www.domain1.org

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  3. #3
    Coolness!
    So, that means that I only need to change domain1 and domain2 with palmbeachtravel and it'll work!

    (I really don't know s*it about .htaccess)

    Thx a lot mate!

  4. #4
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    You got it

    Code:
    Options +FollowSymLinks 
    RewriteEngine on 
    RewriteCond {HTTP_HOST} ^(www\.)?palmbeachtravel\.info [NC] 
    RewriteRule ^(.*)$ http://www.palmbeachtravel.org/$1 [R=301,L]

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  5. I have always wondered, is there an advantage to using mod rewrite over using redirect?

    Code:
    Redirect 301 /                                      http://www.example.com/
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  6. #6
    Quote Originally Posted by Will.Spencer View Post
    I have always wondered, is there an advantage to using mod rewrite over using redirect?

    Code:
    Redirect 301 /                                      http://www.example.com/
    redirect is just aliased to mod_rewrite...

  7. #7
    That's my major question also, but I'm not sure Redirect allows me to keep my Google images traffic...

    /me tests later

  8. #8
    Now this is weird...

    I had to use something like:

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.palmbeachtravel.org/$1 [R=301,L]
    Otherwise it wouldn't work...

  9. Ye i like useing 403 redirect or if you have cpanel just add a redirect in the control panel

  10. #10
    You should always use a 301 redirect. The problem with specifying each redirect instead of using regex is scalability. It's MUCH easier to make sure every URL is properly redirected with regex than it is to manually specify hundreds of URLs.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 7 September, 2010, 22:24 PM
  2. .htaccess All Page Redirect
    By ProxySites.ca in forum Managing
    Replies: 7
    Last Post: 28 May, 2010, 22:52 PM
  3. .htaccess / redirect to 'www.'
    By Snak3 in forum On-Site SEO
    Replies: 12
    Last Post: 30 December, 2009, 20:13 PM
  4. .htaccess help needed - dynanmic redirect
    By DomainMagnate in forum Programming
    Replies: 13
    Last Post: 27 September, 2009, 11:52 AM
  5. Domain Redirect
    By Riccur in forum Domaining
    Replies: 1
    Last Post: 13 July, 2009, 02:01 AM

Tags for this Thread

Bookmarks

Posting Permissions

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