Support

Admin Tools

#35287 www in URL Redirection Tool

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
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Wednesday, 26 May 2021 02:11 CDT

parker-ward

Hi there,

 

I've recently been using the URL Redirect feature in Admin Tools Joomla!

Even though it's very useful, I've realised that i'm limited to using non-www when creating redirects.

For example, I create a new redirect for https://website.com/old-url -> https://website.com/new-url

Now, when I go to https://www.website.com/old-url, it simply just redirects to the site root and doesn't go to the specified target URL! (https://website.com/ instead of https://www.website.com/new-url)

I've already enabled non-www -> www redirects in the .htaccess maker, what else can be done?

Thanks

nicholas
Akeeba Staff
Manager

It's not a matter of www and non-www. The redirection you created is wrong. You need to redirect old-url to new-url without putting in the URL to your site in there. Please read the documentation and the information on your screen.

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!

parker-ward

No, I didn't put the URL there at all, I've only used relative URLs! That is not my problem.

The problem isn't with setting www in the URL redirect, it's that when I go to the www. version of that redirect, it redirects me to the homepage rather than the destination of that redirect.

For example:

Redirect: /old-url -> /new-url

 

Now, when I go to website.com/old-url to see if it works, it does and takes me to website.com/new-url

However, if I go to www.website.com/old-url, it takes me to website.com/

 

Do you understand better?

nicholas
Akeeba Staff
Manager

Yes, I do understand but I still don't see how this is possible if you are using Admin Tools Pro 6.0.6 and the non-www to www redirection happens through the .htaccess file generated by its .htaccess Maker since we have the same setup and it works correctly.

For example, we have this redirection:

Visiting this: documentation/akeeba-backup-documentation/alternative-cron-script.html
Takes you here: /documentation/akeeba-backup-documentation/automating-your-backup.html#alternative-cron-script

We also have the non-www to www redirection i.e. visiting https://akeeba.com takes you to https://www.akeeba.com

Try visiting this URL:

https://akeeba.com/documentation/akeeba-backup-documentation/alternative-cron-script.html

It takes you to https://www.akeeba.com/documentation/akeeba-backup-documentation/automating-your-backup.html#alternative-cron-script as intended.

You can even try with HTTP instead of HTTPS. It still works because the HTTP URL is transformed to HTTPS due to the HSTS policy and then the URL redirection kicks in.

Based on the above, I have to conclude that the non-www to www redirection is not taking place through our generated .htaccess file or you've modified that code or you have not regenerated your .htaccess file after upgrading Admin Tools the past several months.

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!

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!