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

Request - How to Add subdomains and ridirects like that?

~AEdes~

banned
I would like to ridirect the uploaded image like this way:

Lets say i want to upload my images on the directory i2, so the image will be uploaded in :
Code:
http://www.img-bb.com/i2/7kWOh.jpg

When I click that link, the image goes in the exact link like above right?

Now my idea was to redirect that link to something like this:

Code:
http://i2.img-bb.com/7kWOh.jpg

How that can be done without producing problems of course ?

thanks for reading, I hope someone will help me. (by the way im using cpanel where i host my domain). :rolleyes:
 
Danny.Domb said:
You can simply follow this tutorial and everything will be fine (tested it myself)
http://www.everymanhosting.com/cpanel-tutorials/create-subdomains.php

Besides making the sub domain, what do you need to change to make it work?
I would like this working as well but it is never mentioned how it's done..
You would have to set the folder for i.yoursite.com to the /Chevereto/image folder right?
And what do you have to change to make it display the new address in the image page?
 
There is a lot of ways to do this actually, the best way of doing it depends on what you want to achieve. For instance, I think that have a file uploaded into /dir and then redir to dir.domain.com is wrong.

You should upload to /dir and tell that the uploaded image is on dir.domain.com and not handle a redirect. But, why you want a subdomain to do this kind of job? Is not necessary... You need to do that if you have different servers, one for the uploader and other for the files.
 
Well mostly to make the url look nicer for the end-user and to make it ready if I need to use remote server later, so I won't break the links.
So it looks like http://i.yoursite.com/uThDj.png instead of http://yoursite.com/images/uThDj.png
But I'm not sure if you mean that I should use the same folder as I do now (home/root/public_html/yoursite.com/images) and set the subdomain to look at home/root/public_html/yoursite.com/images and then change the settings for what the image page (the ?v= page) shows as well as the link that get shorten with a tinyurl service.

or if you suggest that I make a specific folder for the images in my public_html (eg home/root/public_html/img_yoursite) that I then make the ?v= page look at (still as i.yoursite.com)?

Either way, what files tell the ?v= page where the pictures went? And is there an easy way to change that to i.yoursite.com?
 
The best practice to do is have the images on one domain and the service in another. The domain for files can be a different server, or a different website on the same server, etc... So in the landing page where you have the uploader you internally trigger the uploads to this file server... How to do that? I can't give you a short answer for that other than "you have to modify the upload class".

Also you will need to customize the theme for the new url vars. Chevereto can be highly customized, but I'm afraid that this kind of request or suggestions can't be answered on few lines.
 
Depends on your server config, if your sites are on the same folder you can tell the script that the folder is in /home/sites/mysite2/images for instance, I think that you will need to tweak the uploader class to avoid call the Chevereto path.

Then, you must change the theme vars that uses the base url
 
I wanna now this too... but i wanna uploader script random select one of my for example 5 sub domains (img2.interes.hr, img3.interes.hr, im4.interes.hr, img0.interes.hr.... you get what do i want?
 
Back
Top