× Here you can get community support related to ReDJ.

upper case redirect not working

  • bonaventure
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 10 months ago #2625 by bonaventure
upper case redirect not working was created by bonaventure
My from and to URL's are as follows (thanks to Luigi for helping me configure everything):
From URL: ^/[0-9A-Za-z]{4}$
To URL: http://{siteurl}/horses/${id}-${alias}
"Case sensitive" is not checked, so it shouldn't matter if the alias is mysite.com/aaaa or mysite.com/AAAA.
However, it throws an error when I use upper case. Is there a way to convert them to lower case on the fly or do I need to change the expression above?

I also have placeholders that grab the id, so I'm not sure if there is a conflict with the lowercase alias in the database and the uppercase alias in the referring URL.

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #2627 by admin
Replied by admin on topic upper case redirect not working
Hi,
the case sensitive allows you to match both /aaaa and /AAAA. The problem is when you take this key to search in the database where there's only aaaa. So we need to put the key in lowercase before to search. Change placeholders like the following:
p={pathltrim /}
alias={lowercase}${p}{/lowercase}
id={tableselect #__content,id,alias}${alias}{/tableselect}

After this all should work properly.

Kind regards,
Luigi
The following user(s) said Thank You: bonaventure

Please Log in or Create an account to join the conversation.

  • bonaventure
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 10 months ago #2630 by bonaventure
Replied by bonaventure on topic upper case redirect not working
Works perfectly! Thank you.

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #2633 by admin
Replied by admin on topic upper case redirect not working
U're welcome.

Please Log in or Create an account to join the conversation.

Time to create page: 0.074 seconds