× Here you can get community support related to ReDJ.

Replacing "/item/1234-"

  • kalixo
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 9 months ago #5002 by kalixo
Replacing "/item/1234-" was created by kalixo
Dear all,
I need to redirect from:
website.com/item/XXXX-urlname
to:
website.com/urlname

So, I need to remove "/item/XXXX-" from my urls. Those "XXXX" are always four numbers, and "-" is always "-".
"Ulrname" sometimes can start with number(s).

Thansk is advance,
best regards,
Kalixo.

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

More
7 years 9 months ago #5005 by admin
Replied by admin on topic Replacing "/item/1234-"
Try this:
From URL: ^/item/[0-9]+-
To URL: {scheme}://{siteurl}{preg_match 1}/[0-9]+-(.*)$/{/preg_match}
Request only: true (checked)

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

  • kalixo
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 9 months ago #5008 by kalixo
Replied by kalixo on topic Replacing "/item/1234-"
Dear Admn
Thank you for solution, but It doesn't work propperly - now I got address:
website.comurlname (so it removes also "/").
Could you please correct this problem?

Thansk,
Kalixo

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

More
7 years 9 months ago #5014 by admin
Replied by admin on topic Replacing "/item/1234-"
It's easy, you should try by yourself:
From URL: ^/item/[0-9]+-
To URL: {scheme}://{siteurl}/{preg_match 1}/[0-9]+-(.*)$/{/preg_match}
Request only: true (checked)

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

  • kalixo
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 years 9 months ago - 7 years 9 months ago #5016 by kalixo
Replied by kalixo on topic Replacing "/item/1234-"
Dear Admin,
thank you, everything works just great!

BIG THANKS!
Last edit: 7 years 9 months ago by kalixo.

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

More
7 years 9 months ago #5017 by admin
Replied by admin on topic Replacing "/item/1234-"
U're welcome!

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

Time to create page: 0.089 seconds