• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

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