Submit Your Article Forum Rules

Results 1 to 4 of 4

Thread: How do I set-up redirect - 404 - to the new file?

  1. #1
    Junior Member
    Join Date
    Feb 2004
    Posts
    24

    How do I set-up redirect - 404 - to the new file?

    I have changed mulitple file names and would like to know how set-up 404 redirect to the new names.

    Thanks for your assistance.

  2. #2
    Your control panel may offer you the option of creating custom error pages. If not and if you are using a *nix box you can use an htaccess file for the redirection.

    ErrorDocument 404 /404.php or htm or html or shtml
    ErrorDocument 403 /403.php or htm or html or shtml
    ErrorDocument 500 /500.php or htm or html or shtml

    If you already have an .htaccess file just add the code above then upload it to your root directory.

    If you don't have an htaccess file then create one with a text editor using the code above and upload it to your root directory.

    Hope this helps.

    Rick

  3. #3
    WebProWorld MVP minstrel's Avatar
    Join Date
    Jul 2003
    Location
    Ottawa, Canada
    Posts
    2,553
    As Rick said, if you are looking for a way to redirect errors to a custom error page, that's the way to do it:

    ErrorDocument 404 /customerrorfilename.htm

    Did you mean to ask how to redirect from an old filename to a new filename? If so, you can also do that in that same .htaccess file --

    Redirect /oldname.htm http://www.yoursite.com/newname.htm

    although that's not the only way to do it... you can also use a "meta refresh" tag in the <HEAD> section of your page:

    <META HTTP-EQUIV="REFRESH" CONTENT="10;
    URL=http://www.newsite.com/newpage.htm">

  4. #4

Similar Threads

  1. Redirect .php file in IIS server
    By akela007 in forum Other Engines/Directories
    Replies: 2
    Last Post: 01-03-2007, 09:54 PM
  2. Changing name of page file - Redirect Question
    By back in 52' in forum Other Engines/Directories
    Replies: 2
    Last Post: 08-04-2006, 08:32 PM
  3. Windows 2000 Slow with File Open and File Save Dialog Boxes
    By steve0 in forum IT Discussion Forum
    Replies: 2
    Last Post: 09-15-2005, 05:27 PM
  4. Dreamweaver: Error accessing file...bad file path
    By mimsymc in forum Graphics & Design Discussion Forum
    Replies: 6
    Last Post: 07-10-2005, 08:43 PM

Posting Permissions

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