Support

Admin Tools

#27327 Redirection of virtuemart category

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 esperando on Tuesday, 14 March 2017 09:44 CDT

esperando
 Hi, i tried to redirect an old virtuemart category url to a new one without success.

I tried with the following rules:

Existing url: πυροσβεστήρες/ξηράς-σκόνης
New url: πυροσβεστήρες-ξηράς-σκόνης

Existing url: https://mydomain.com/πυροσβεστήρες/ξηράς-σκόνης
New url: https://mydomain.com/πυροσβεστήρες-ξηράς-σκόνης

I have two languages installed, greek and english. Greek is the default language and i selected "Yes" in the option "Remove URL Language Code" in System - Language Filter plugin.

Also i think the terms existing/new url is a little confusing. You could replace "new url" with "old url" in a future version. Because usually i think "new url" as the new url that will replace the old url that doesn;t exist anymore.

Best regards,
Yiannis

nicholas
Akeeba Staff
Manager
Also i think the terms existing/new url is a little confusing. You could replace "new url" with "old url" in a future version. Because usually i think "new url" as the new url that will replace the old url that doesn;t exist anymore.


50% of our users agree with you on what old and new is. 50% of our users disagree with you. So, I named them existing and new. Existing is unambiguous: it either EXISTS before you create a redirection or it doesn't. It cannot exist if it's invalid and throws a 404.


Regarding your problem, I don't know which is the URL you are using now. I will need the URL you are using now to really help you. I know what you tried but I'm not sure if you are doing something the other way around than what you should be doing.

Let's say the page is currently accessible without a redirection as http://www.example.com/apple. Let's say that you actually want someone typing http://www.example.com/orange to see the same page. You need to create a redirection where
Existing URL: apple (WITHOUT the domain name, WITHOUT the leading slash)
New URL: orange (WITHOUT the domain name, WITHOUT the leading slash)

What it really does. When someone visits http://www.example.com/orange they are redirected to http://www.example.com/apple. The http://www.example.com/apple page is displayed on their browser and the URL http://www.example.com/apple is shown on their browser's address bar.

So, knowing that, the second thing you tried will never work because the new URL is invalid. The first thing you tried would have this effect: if the user visits http://www.example.com/πυροσβεστήρες-ξηράς-σκόνης they will be redirected to http://www.example.com/πυροσβεστήρες/ξηράς-σκόνης

Also keep in mind that this will only work if the Admin Tools plugin is published before your SEF plugin. If, for example, you are using sh404SEF and its plugin is before Admin Tools then the redirection feature will not work because sh404SEF will have handled the URL before we have the chance to see it.

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!

esperando
System - Admin tools has ordering -103 and System - SEF -100.

I have published with "override all" option this rule:

Existing url: πυροσβεστήρες/ξηράς-σκόνης
New url: πυροσβεστήρες-ξηράς-σκόνης

My website is https://pyrellas.gr

nicholas
Akeeba Staff
Manager
Hm, I have two suspicions. Let's try the simple one first.

Existing url: el/πυροσβεστήρες/ξηράς-σκόνης
New url: πυροσβεστήρες-ξηράς-σκόνης

Yes, I know you are removing the language prefix but I have a suspicion about how that really works under the hood.

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!

esperando
That did not work. Still not redirecting.

esperando
If it helps i see now that the redirections don't work only when the new url is related with virtuemart category and the url is in greek characters.

nicholas
Akeeba Staff
Manager
That was the second suspicion I had :( It seems that your server passes the encoded URL to PHP. Therefore the new URL must be URL-encoded e.g. with thi online encoder. Unfortunately I can't paste the URL-encoded New URL here because our server's security filter throws a fit :/

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!

esperando
Can you please explain what you mean, because i am not sure i understand?

Should i ask my server admin to change some configuration or i have to modify something in joomla or virtuemart?
Is this error because i use greek characters in my url's?

nicholas
Akeeba Staff
Manager
You don't have to change anything. The problem is because of the Greek characters in the URL. Go to the site I told you and paste πυροσβεστήρες-ξηράς-σκόνης to it. Click on the "Encode url" button. It will translate it to some gibberish that has a lot of percent signs. Copy that into the New URL field of Admin Tools' URL Redirect. Does that work on your server?

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!

esperando
It's working, thank you Nicholas! :)

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!