.htaccess help

  • homer simpson
  • Student
  • Student
  • No Avatar
  • Joined: Jan 01, 2003
  • Posts: 96
  • Status: Offline

Post January 6th, 2004, 12:53 pm

What do I have to do to my .htaccess file to send all of my 404 pages to one particular page?

I need to take down some pages but I don't want to waste that traffic.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post January 6th, 2004, 12:53 pm

  • RichB
  • Guru
  • Guru
  • User avatar
  • Joined: May 17, 2003
  • Posts: 1121
  • Loc: Boston
  • Status: Offline

Post January 6th, 2004, 4:22 pm

Here's an .htaccess generator that will produce the lines you need to add for you. There are also generators for things like ip blocking and preventing hotlinking available from the drop down menu.

http://htmlbasix.com/customerrorpages.shtml
Free Programming Resources
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post January 7th, 2004, 7:04 am

For a file not found forwarder..

ErrorDocument 404 whatever.html (to point to whatever.html in the directory they're currently in)

ErrorDocument 404 /whatever.html (to point to whatever.html in the main root directory of the domain - make sure your images used on that HTML page include a complete path from the root of your website)..

ErrorDocument 404 http://www.whatever.com/someerror.html (this will actually forward them to a particular URL in the event of an error)

You can do...

ErrorDocument 401 somefile.html (Authorization Error - need to identify with uid/pass usually)
ErrorDocument 403 somefile.html (Permission Denied - I think, like if a file doesn't have correct permissions to be read by Apache, or whatever web server)
ErrorDocument 404 somefile.html (file not found)
ErrorDocument 500 somefile.html (script error)

in a .htaccess file.
  • ClericVash
  • Banned
  • Banned
  • User avatar
  • Joined: Jan 06, 2004
  • Posts: 65
  • Status: Offline

Post January 7th, 2004, 2:59 pm

for the last bit you probably wouldnt put the brackets right?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post January 7th, 2004, 3:22 pm

Nope, you wouldn't put the stuff in brackets, I just put that there to explain what each one is :)
  • lslars31
  • Novice
  • Novice
  • No Avatar
  • Joined: Jan 10, 2004
  • Posts: 16
  • Loc: Minesota
  • Status: Offline

Post January 10th, 2004, 7:11 pm

if you have cpanel you can just do it there...

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 146 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.