• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Removed or Non-Existant Images

Status
Not open for further replies.

sp3ctr3

Chevereto Member
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:

21kgwph.jpg
 
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:

Code:
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
 
tonemapped said:
My htaccess looks like this:

Code:
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.
 
Code:
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 default

That 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.
 
Status
Not open for further replies.
Back
Top