![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jul 2001
Location: See sig
Posts: 6,989
|
Quick htaccess question
Something I've never had to do before...
I need to pop up a standard 'no image available' image on a site whenever an image is broken. It has a huge database and manually digging out broken images to replace them would take hours. Any ideas? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
best designer on GFY
Join Date: Mar 2003
Location: IALIEN.COM - High Definition Video and Photographic Productions -ICQ 78943384
Posts: 30,307
|
Use HTACCESS
![]()
__________________
![]() ![]() NAKED HOSTING FTW!11 I'm On The INSANE PLAN $9.95/mo! | The Alien Blog Adult News Worth Reading Updated Daily | Content For Sale! 641 PICS 216 MINUTES OF VIDEO $350.00 |ICQ: 78943384 | |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jul 2001
Location: See sig
Posts: 6,989
|
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jul 2001
Location: See sig
Posts: 6,989
|
Quick bump in case anyone knows. Not sure it's even possible though.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
There's a way to do it with mod_rewrite. Give me a minute and I'll dig it up for you.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Jan 2002
Posts: 7,981
|
http://httpd.apache.org/docs/mod/mod...ml#RewriteCond
-f' (is regular file) Treats the TestString as a pathname and tests if it exists and is a regular file. You will probably find an example of it on this page: http://httpd.apache.org/docs/misc/rewriteguide.html |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Jul 2001
Location: See sig
Posts: 6,989
|
Thanks I'll give it a go. If not then yep - looks like a script thing which'll keep me busy while I try to get my head back into php mode - it's been a while
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Wisconsin
Posts: 4,517
|
Fusionx is probably right, but this should work:
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.jpg$ /path/to/missing.jpg [L] but be prepared for much more cpu usage |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Join Date: Jul 2001
Location: See sig
Posts: 6,989
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Join Date: Jul 2001
Location: See sig
Posts: 6,989
|
Quote:
Scrap the reply above. I replied without thinking or looking at the apache docs. It works more than fine and the CPU usage should be OK as it's a non-porn site so traffic is manageable ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
In Tushy Land
Join Date: Oct 2002
Location: Nebraska
Posts: 40,149
|
your fucking sig sucks ass.
|
![]() |
![]() ![]() ![]() ![]() ![]() |