.htaccess help

  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • RichB
  • Guru
  • Guru
  • User avatar
  • Posts: 1121
  • Loc: Boston

Post 3+ Months Ago

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
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

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
  • Posts: 65

Post 3+ Months Ago

for the last bit you probably wouldnt put the brackets right?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Nope, you wouldn't put the stuff in brackets, I just put that there to explain what each one is :)
  • lslars31
  • Novice
  • Novice
  • lslars31
  • Posts: 16
  • Loc: Minesota

Post 3+ Months Ago

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

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: Bogey and 132 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.