SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    htaccess - help needed

    I recently moved to a new server and when people access my old site they see the "I moved" page with the new URL etc. but I would like for visitors to also get that page when they for instance try to access a subdomain or another page on my old server.
    Of course I can do this by replacing ALL my shtml pages, but I figured it could be done somehow with a htaccess file

    Can anyone help me on this?

    I have no experience with htaccess, so I need to know if the file should contain other commands as well.

    Thanks!

  2. #2
    SitePoint Evangelist ucahg's Avatar
    Join Date
    Apr 2001
    Location
    Sarnia, Ontario, Canada
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know the exact commands to put in the htaccess file, but delete everything and make the 404 error page the I've moved page.
    Love it? Hate it? Helpful? Useless?
    Use the rate button to let me know what you think of my post!

  3. #3
    SitePoint Zealot
    Join Date
    Dec 1999
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by ucahg
    I don't know the exact commands to put in the htaccess file, but delete everything and make the 404 error page the I've moved page.
    The htacces command to redirect to a site when a 404 occurs is:

    ErrorDocument 404 http://www.domain.com/

  4. #4
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you both for the reply.
    I set it up and it works great


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
  •