• 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

.htaccess for use with Codefuture 1.4

Status
Not open for further replies.

Piers

Founder licence
Hello,

The codefuture scripts takes images, uploads them to /u/images/ and then gives a user a link without a direct path.

For example:

1) User uploads 123.png
2) (backend) image is uploaded to domain.com/u/images/123.png
3) User is given link domain/com/di-123.png

I would like to make it so all previously uploaded image links still work, however I am happy for new images to use the chevereto file paths.

Hope that makes sense.
 
I have just found that this was already suggested here: http://chevereto.com/forums/topic1070-moving-over-from-cf-image-host.html

Anyway, move all the codefuture images to /images and then change the Chevereto .htaccess to this:

Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^api$ api.php [L]
RewriteRule ^di-(.*)?$ images/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>

Options -Indexes

Notice the line:
Code:
RewriteRule ^di-(.*)?$ images/$1 [L]

And now, a URL like this: http://demo.chevereto.com/di-tfxYk.png
Shows an image that is actually here: http://demo.chevereto.com/images/tfxYk.png

Is that simple 😉
 
Just tried that, it's giving a 404 when I try and type domain.com/di-q5JMi.png . any idea?
 
Status
Not open for further replies.
Back
Top