Computer Geeks

Computer Geeks

Geek Shop

Geek News

Geek Stuff

Science Geek

Computer Gaming

Linux Chat

Building Websites

Computer Forums

Computer Help Forum

Computer Hardware Forum

Computer Software Programs


Go Back   Computer Forums > Building Websites
FAQ Community Calendar Today's Posts Search

Building Websites This section covers all aspects of publishing, developing and maintaining websites. Topics include: website design, graphic design, website programming, web hosting, website marketing (SEO, link exchange, publicity, advertising), monetization & etc.

Computer Geeks
» Active Discussions
Computer Geeks
No Threads to Display.
» Other Websites
- Software Publishing

- Server Hardening
Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2007, 09:53 AM
Billy41684's Avatar
Billy41684 Billy41684 is offline
Member
GB Beginner
 
Join Date: Jul 2006
Posts: 45
Send a message via ICQ to Billy41684 Send a message via AIM to Billy41684 Send a message via MSN to Billy41684 Send a message via Yahoo to Billy41684
Default Apache 404 for certain directory (not virthost)

I have a directory on my server that is literally jam packed full of neat softwares and other cool stuff (not exactly legal). A few weeks ago I notice _huge_ amounts of bandwidth being used for long periods at a time. First reaction was "Yay! Hits!" But then after a few days I started to get worreid as the bandwidth never slowed - it stayed 100% outgoing...

So I checked the logs and found out that Google has crawled my entire _HIDDEN_ directory with all my not-exactly-legal stuff in it. What fun!!!! :O Now, Google was done, but now come the visitors, downloading all this stuff from my server!! CRAP!!!

So, I took down the music symlink, and password protected the downloads directory... Yay! bandwidth problem fixed! Well, ... here's the problem... Google still has all 17,000+ tracks of music in the cache! So, I'm still getting visitors wanting to get this from me, but they are getting a 404. I am getting a SH1T TON of 404 errors :/ yay!

I am still getting a higher volumn of bw useage for my domain, which I cannot locate anywhere as to whats using that much bw. So, I can only assume its the bw for all these 404 errors (I get more 404 errors than I do views to all pages combined ).

Now, what I would like to do is redirect all these 404's from the music directory to a smaller custom 404 page (to cut down on bw usage even more). But this 404 would have to cover all sub directories too (sometimes 5+ deep).

Or maybe someone has a better idea on what I can do here?
__________________
-Billy

"I am using Linux every day to up my productivity - so up yours!"

******** W A R N I N G ! *******************************
Linux should not be used by those under the influence of MicroSoft.
May cause dizziness or vertigo. Consult your tech support before
using Linux. (note--after using Linux, you may notice extreme
discomfort when using MicroSoft. Discontinue use of MicroSoft.)
******************************* W A R N I N G ! ********
Reply With Quote
  #2  
Old 09-16-2007, 12:14 AM
John John is offline
Administrator
GB Admin
GB GEEK
 
Join Date: Jun 2006
Location: NJ
Posts: 255
Default

I believe the way to create a custom 404 error page for a specific directory would be to configure that within a Directory directive. That can be also inside the VirtualHost directive as well.

It might be something like the following:

<VirtualHost 192.168.5.5:80>
ErrorDocument 404 /404a.php
<Directory /path/to/directory>
ErrorDocument 404 /404b.php
</Directory>
</VirtualHost>
__________________
John Hammell
Network Administrator
Computer Geeks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Powered by vBadvanced CMPS v3.2.3

All times are GMT -5. The time now is 06:32 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
HTML Help provided by HTML Help Central.