× Here you can get community support related to ReDJ.

Remove article id when migrating to new Joomla router

  • bartoszmachnik
  • bartoszmachnik's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 5 days 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.

Website and web store design: Sitte.pl

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

More
5 years 11 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
  • bartoszmachnik's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #6987 by bartoszmachnik
Replied by bartoszmachnik on topic Remove article id when migrating to new Joomla router
Thank You for answer.

Its not one address but all articles addresses. Yes I checked if new address works.

After I change router to modern and remove id from addres I need to rewrite old structure:
kreatorzy.eu/wiedza/3024-konferencje-it
to new one:
kreatorzy.eu/wiedza/konferencje-it

So I just need to remove ([0-9]+)- part from address. I thought it would be possible with regular expression.

Website and web store design: Sitte.pl

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

More
5 years 11 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
  • bartoszmachnik's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #6989 by bartoszmachnik
Replied by bartoszmachnik on topic Remove article id when migrating to new Joomla router
Thank You. It's working.

Website and web store design: Sitte.pl

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

More
5 years 11 months ago #6997 by admin
U're welcome

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

Time to create page: 0.148 seconds