Support

Admin Tools

#37513 rewrite base URL

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
3.10.10
PHP version
8.0
Admin Tools version
6.1.7

Latest post by toonetcreation on Monday, 25 July 2022 11:26 CDT

toonetcreation

Hi,

I'm using AdminTools on some websites and I have to change a domain name for one of these websites.

Old domain was www.old-website.com

New domain is www.new-website.com

With AdminTools, is it possible to redirect all old URLs like www.old-website.com/contact.html to www.new-website.com/contact.html ?

Thanks

L.

nicholas
Akeeba Staff
Manager

Yup, it's been possible since the very first version of Admin Tools in 2010.

Requirement: both domain names (www.old-website.com and www.new-website.com) must be served by the same hosting user account. For cPanel–based hosts this means that one of these domains is the primary domain of the account and the other one is an add-on domain.

In this case you can go to the .htaccess Maker and find the “Redirect this (old) domain name to the new one” option. Enter your old domain name in there. Example:

www.old-website.com,old-website.com

Every time someone tries to visit the old domain name the request is handled by your server. However, the .htaccess file redirects it to the same URL on the new domain name.

You can try this on our own site. Between 20010 and 2020 our site was www.akeebabackup.com. Ever since September 2020 it's www.akeeba.com. Try visiting the URL of your ticket on the old domain i.e. https://www.akeebabackup.com/support/admin-tools/37513-rewrite-base-url.html. See what happens? You are magically redirected to the same URL on the new domain name. That's how we changed our domain name and nobody, literally nobody, noticed or did even as much as bat an eyelid.

We applied the same trick in 2010 when we moved from our old site (joomlapack.net) to akeebabackup.com. Again, most people never noticed the change. Those who did notice the change only did because there was a very big difference in the domain name, a new site design and we started selling subscriptions. Most people really only noticed the latter :D

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

toonetcreation

ok I see, you're right I forgot this small option ;-)

my main idea was to do it on .htaccess file but if there is such option in admin tools that's good.

ok so in cPanel, the new domain has to be the main domain and the old domain has to be a second domain linked to /www directory also?

nicholas
Akeeba Staff
Manager

The .htaccess Maker does create a .htaccess so, yup, it's done in the .htaccess file :)

> ok so in cPanel, the new domain has to be the main domain and the old domain has to be a second domain linked to /www directory also?

Correct. Ask your host about where to find the Addon Domain option in cPanel. That's the one that works best for what you are trying to do.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

toonetcreation

ok so from DNS zone, both new and old domain A entry must be linked to the same server of course?

nicholas
Akeeba Staff
Manager

Correct!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

toonetcreation

Ok many thanks.

Have a good evening

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!