Take off numeric ID from an url
-
mxcpz
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 1
-
Thank you received: 0
-
-
10 years 1 month ago #3190
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.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 1 month ago #3191
by admin
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.164 seconds