• 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.

.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