× Here you can get community support related to ReDJ.

Take off numeric ID from an url

More
10 years 10 months ago #3190 by mxcpz
Take off numeric ID from an url was created by mxcpz
Hi,
some time ago I made (well, you made for me) two fields:
Form url: ^/tag/[^-]+-[^-]+$
To url: http://{siteurl}/index.php/component/search/?Itemid=1&searchword={preg_match 1}/\/tag\/([^-]+)-([^-]+)/i{/preg_match}%20{preg_match 2}/\/tag\/([^-]+)-([^-]+)/i{/preg_match}&submit=Search&searchphrase=exact&ordering=newest

and
from url: /tag/[^0-9]
to url: http://{siteurl}/index.php/component/search/?Itemid=1&searchword={pathfrombaseltrim /tag/}&submit=Search&searchphrase=exact&ordering=newest

very, very useful.

Now with the new version of Joomla tags changed a bit. I have another problem/question if possible.
My url to redirect is http://{siteurl}/component/tags/tag/29-puglia
into an url like those above, but without the number.
Infact the redirects above do a redirect but into a search "29 puglia", finding no resut because of the numbers.

Thx for your help,
Mario

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

More
10 years 10 months ago #3191 by admin
Replied by admin on topic Take off numeric ID from an url
Hi,
this rule should work:
From URL: ^/component/tags/tag/[0-9]+-
To URL: http://{siteurl}/index.php/component/search/?Itemid=1&searchword={preg_match 2}/\/tag\/([0-9]+)-(.*)$/i{/preg_match}&submit=Search&searchphrase=exact&ordering=newest

Kind regards,
Luigi

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

Time to create page: 0.135 seconds