Topic: Removed or Non-Existant Images
Any way that if someone tries to display/use/share an image that doesn't exist or was removed it'll show a different image?
Probably explained it wrong/weirdly, but it should work like:

You are not logged in. Please login or register.
Any way that if someone tries to display/use/share an image that doesn't exist or was removed it'll show a different image?
Probably explained it wrong/weirdly, but it should work like:

Add this rules to the .htaccess file
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$
RewriteRule .* path/to/noimage.gif [L]http://www.webhostingtalk.com/showpost. … ostcount=3
Added and tried, but so far, it treats it like a 404 Error and shows the 404 Page.
call it before the default rules of chevereto
It changes the background on some parts of my theme.
Mmm... I will test it and trow you the rules.
Added it and it seems to work on my site.

Hmm, maybe I put it in the wrong place? Where did you add that code? Never learned too much about .htaccess files.
I added it at the top of the file and used an uploaded image as the image link in there.
My htaccess looks like this:
ServerSignature Off
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^api$ api.php [L]
RewriteRule ^di-(.*)?$ i/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$
RewriteRule .* http://anony.ws/i/1fB9b.png [L]
Options -Indexes
DirectoryIndex index.html index.php
ErrorDocument 400 default
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 defaultLast edited by Piers (2012-01-05 17:48:42)
My htaccess looks like this:
ServerSignature Off Options -Indexes <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^api$ api.php [L] RewriteRule ^di-(.*)?$ i/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] </IfModule> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$ RewriteRule .* http://anony.ws/i/1fB9b.png [L] Options -Indexes DirectoryIndex index.html index.php ErrorDocument 400 default ErrorDocument 401 default ErrorDocument 403 default ErrorDocument 404 default ErrorDocument 500 default
Hmm, mine doesn't work. Even copied and pasted your code. Not sure what's wrong.
ServerSignature Off
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^api$ api.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$
RewriteRule .* http://anony.ws/i/1fB9b.png [L]
ErrorDocument 400 default
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 defaultThat is the only bit that you should need.
Doesn't work, unless I'm using it wrong?
I'm expecting it to lead to that special image if I try to view a non-existant image.
Powered by PunBB, supported by Informer Technologies, Inc.
Powered by PunBB