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

Thread: Quick redirect help needed

  1. #1
    DomainMagnate's Avatar
    DomainMagnate is offline Super-Duper Moderator
    Join Date
    Dec 2008
    Posts
    749
    Blog Entries
    2
    Thanks
    150
    Thanked 175 Times in 110 Posts

    Quick redirect help needed

    So I want to redirect subdomain.domain1.com to domain2.com. What's the easiest way to do it?

    also whats the correct line for non-www to www redirect

  2. #2
    weirdnessme is offline Newbie Net Builder
    Join Date
    Mar 2009
    Posts
    286
    Blog Entries
    1
    Thanks
    19
    Thanked 31 Times in 30 Posts
    Place the following HTML redirect code between the <HEAD> and </HEAD> tags of your HTML code.


    <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">
    The above HTML redirect code will redirect your visitors to another web page instantly. The content="0; may be changed to the number of seconds you want the browser to wait before redirecting.


  3. #3
    small is offline Newbie Net Builder
    Join Date
    Apr 2009
    Posts
    35
    Thanks
    7
    Thanked 10 Times in 9 Posts
    put these lines in your .htaccess


    # redirect from old domain to new domain
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^(.*) http://www.newdomain.com/$1 [R=301,L]


    # redirect non-www to www
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

  4. #4
    DomainMagnate's Avatar
    DomainMagnate is offline Super-Duper Moderator
    Join Date
    Dec 2008
    Posts
    749
    Blog Entries
    2
    Thanks
    150
    Thanked 175 Times in 110 Posts
    small, I just tried this and got a Redirect Loop.

  5. #5
    fast1 is offline Newbie Net Builder
    Join Date
    Mar 2009
    Posts
    20
    Thanks
    0
    Thanked 1 Time in 1 Post
    what is a Redirect Loop?

  6. #6
    DomainMagnate's Avatar
    DomainMagnate is offline Super-Duper Moderator
    Join Date
    Dec 2008
    Posts
    749
    Blog Entries
    2
    Thanks
    150
    Thanked 175 Times in 110 Posts
    apparently it's when you get an error page that says 'Redirect Loop'

  7. #7
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    A redirect loop is when you redirect one URL to a second URL, which redirects it back to the first URL.

    This is what I use for simple domain redirects:
    Code:
    Redirect 301 /                                http://www.example.com
    It seems to be that you should simply be able to put that in a file in the directory where that subdomain used to be served. (Warning: I have not tested this...)
    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.

  8. #8
    keynes's Avatar
    keynes is offline Newbie Net Builder
    Join Date
    Mar 2009
    Posts
    62
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Can't you do this in Cpanel? I just re-directed a domain to another domain in Cpanel and it was really easy.
    I assume that you can also re-direct a subdomain to a domain in Cpanel, haven't tried it, though.

  9. #9
    sony's Avatar
    sony is offline Newbie Net Builder
    Join Date
    Mar 2009
    Location
    Croatia
    Posts
    41
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by DomainMagnate View Post
    apparently it's when you get an error page that says 'Redirect Loop'


    Everything is possible to make... Preliminary searches for answers to these questions.
    What is a subdomain? What is a directory (the server)? What is the top-level domain? What is the difference between the subdomain and directory ?
    If, after the answers and still have the need for redirects ...
    sulumits retsambew
    sulumits retsambew
    Learn, learn and learn only. Why learn ? Albert Einstein died, Nikola Tesla died, and nor I do not feel so the best...

  10. #10
    GameOver's Avatar
    GameOver is offline Net Builder
    Join Date
    Apr 2009
    Location
    Australia
    Posts
    337
    Thanks
    43
    Thanked 41 Times in 34 Posts
    I just use cpanel for this. It is extremely simple and takes less than a minute.

Page 1 of 2 12 LastLast

Similar Threads

  1. [WTS] WP Redirect Bot
    By iowadawg in forum Scripts
    Replies: 0
    Last Post: 27 December, 2010, 21:26 PM
  2. Non www to www redirect
    By tetrapak in forum Managing
    Replies: 8
    Last Post: 31 May, 2010, 18:19 PM
  3. Quick Help Needed Please
    By gavenecko in forum Domaining
    Replies: 8
    Last Post: 24 December, 2009, 09:12 AM
  4. .htaccess help needed - dynanmic redirect
    By DomainMagnate in forum Programming
    Replies: 13
    Last Post: 27 September, 2009, 11:52 AM
  5. Non-www. to www. 301 redirect
    By Dr. Stavros in forum Managing
    Replies: 8
    Last Post: 29 July, 2009, 18:51 PM

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
  •