Remove article id when migrating to new Joomla router
-
bartoszmachnik
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 0
-
-
-
-
-
5 years 11 months ago #6965
by bartoszmachnik
Hello. How to set rules to remove id form articles when I enable new Joomla artcles router? I set:
from: ^/wiedza/([0-9]+)-(.+)$
to: {scheme}://{host}/wiedza/ ??? - i tried $(1), ($1), ${1}, $(id) itp.
I tried to add placeholders:
id={preg_match 1}/option=com_content&view=article&id=([0-9]+)/i{/preg_match}
but no possitive results.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
5 years 10 months ago #6975
by admin
Before to redirect to a new URL without the article id, have you tested that the destination URL works? I mean, if you put the target URL in the browser's address bar, does it work? Otherwise you cannot create a rule like that.
There is an internal redirect feature to get better SEF URLs, but it requires some complex rules with query lookup to accomplish a working result.
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
bartoszmachnik
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 0
-
-
-
-
-
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
5 years 10 months ago #6988
by admin
From URL: ^/wiedza/[0-9]+-
To URL: {scheme}://{siteurl}/wiedza/{preg_match 1}/\/wiedza\/[0-9]+-(.*)$/{/preg_match}
Request only: true (checked)
The following user(s) said Thank You: bartoszmachnik
Please Log in or Create an account to join the conversation.
-
bartoszmachnik
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 0
-
-
-
-
-
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
Time to create page: 0.142 seconds