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

Changing Domain

Avast

👽 Chevereto Freak
Hey,

i want to change my main-domain, so the old one shall just forward to the new one.

What do i have to change in my .htaccess file?
Cause it's not a simple forwarding option... all old links have to redirect to the new domain.

Regards,
Avast
 
Are you redirecting the entire website (including images) or will you have images to stay in the same location (so peoples links don't break).

Because what I did, is have one domain (uplo4d.com), kept it so image links weren't broken.

Then moved all the images to the new website (so have duplicate images) and tell users to change their links if they can.

In my htaccess on old website

PHP:
RewriteEngine on
RewriteCond $1 !^/yourimagedirectory/
RewriteRule (.*) http://www.yournewsite.com/$1 [R=301,L]

Which keeps old image links intact, BUT redirects everything else that isn't in the image directory to my new website.
 
No I know that, you don't have to.

What I was saying, is that the old image links will be intact. Like http://www.yoursite.com/images/12/6/1/etc.png will NOT redirect to the new website, as the rewrite rule I posted above will only redirect the main site and not images.

BUT I would still copy all images to the NEW domain location, and possibly have a lightbox on your new site that tells the users that the domain has changed and it's recommended to change links (although they don't need to) as the image links will STILL stay in tact.
 
No I know that, you don't have to.

What I was saying, is that the old image links will be intact. Like http://www.yoursite.com/images/12/6/1/etc.png will NOT redirect to the new website, as the rewrite rule I posted above will only redirect the main site and not images.

BUT I would still copy all images to the NEW domain location, and possibly have a lightbox on your new site that tells the users that the domain has changed and it's recommended to change links (although they don't need to) as the image links will STILL stay in tact.

there's no need to do that.. you can simply use htaccess to redirect old image links to the new domain ones.
 
there's no need to do that.. you can simply use htaccess to redirect old image links to the new domain ones.

Yes I know you can do that.

But with older images, because they are aswell redirected using .htaccess, you can't redirect both.

In other words, all images uploaded in the new format (/12/2/1) will redirect fine with the .htaccess, but the older images (which are redirected using .htaccess as well) won't show up.

I tried to do this with my old image website, but the /old/ images won't show at all. And when I talked to Rod about it, he said that it couldn't be done.
 
Yes I know you can do that.

But with older images, because they are aswell redirected using .htaccess, you can't redirect both.

In other words, all images uploaded in the new format (/12/2/1) will redirect fine with the .htaccess, but the older images (which are redirected using .htaccess as well) won't show up.

I tried to do this with my old image website, but the /old/ images won't show at all. And when I talked to Rod about it, he said that it couldn't be done.

Oh I see your point now.. Then he only has one option left
 
If you want to preserve embed images you MUST do rewriterules, is not hard at all you only need to rewrite all olsite.tld/$traffic to newsite.tld/$traffic where $traffic is the query string.

If you want to only rewrite images $traffic you must add (png|jpg|gif) in the rewriterule to rewrite just that kind of $traffic and the direct site access will do a redirection to newsite.tld

Just my 2 cents.
 
Tell me what URLs you want to save or convert in the new ones :p So I can get a pattern.
 
My main domain was ur-upload.de , second was ur-upload.com.
Now my new domain is share-pic.net.
 
Hm, you need to provide more input here. For example I need to know if all this domains points the same website (like domainA and domainB are on the same public folder in the same website). I also need to see the complete htaccess that you have, perhaps you have conflicting rules.

Most likely you have a bad rule below that one or you miss something.
 
so:
ur-upload.de points to the public folder. share-pic.net too!

ur-upload.com is just a redirection to the public-folder.

my .htaccess looks like this:
Code:
ServerSignature Off
Options -Indexes -MultiViews
 
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^api$ api.php [L]
RewriteRule ^admin/(.*) admin/index.php [L]
RewriteRule ^i/(\w*\.)(jpg|png|gif)$ i/old/$1$2 [L] #legacy images
RewriteRule ^i/thumbs/(\w*\.)(jpg|png|gif)$ i/old/$1th.$2 [L] #legacy thumbs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
 
ErrorDocument 400 default
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
 
Back
Top