SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Redirection...

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    MA
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can someone enlighten me as to how I would redirect visitors to my old site to my new site? I know it must just be some simple code, but I forget it.....

    Thanks!
    http://www.overclockedhardware.com

  2. #2
    SitePoint Addict
    Join Date
    Dec 2000
    Location
    BOSTON MA
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try this.

    <meta http-equiv="refresh" content="0;URL=/domain.com">

    replace the 0 with whatever number of seconds you'd like, and domain.com with your new domain name.
    . . . chris

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    MA
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what I was looking for! Thanks.

    Also, does anyone know how to make it so that when someone goes to, say, file.shtml it automatically redirects to file.html? Like by modifying .htaccess?
    thanks
    http://www.overclockedhardware.com

  4. #4
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A more efficient method if your site supports .htaccess is place this code in a file named: .htaccess into your main web directory of your host.

    Redirect / http://newdomainsite.com

    That way, anyone who visits your domain, for example olddomainsite.com, will be redirected to http://newdomainsite.com regardless of where they entered as the url.

    so even a http://newdomainsite.com/hello/this/...ateverfile.htm

    will bring them to http://newdomainsite.com

    crucial, put the .htaccess file into the server http://oldodmainname.com resides on.
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


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
  •