× Here you can get community support related to ReDJ.

Replace part of the path

  • davidmach
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #4538 by davidmach
Replace part of the path was created by davidmach
Hi!
Can you plase help me with problem I'm stuck with...

I need to make redirect for different photo albums by replacing one part of the path . E.g.:
domain.org/component/phocagallery/category/8-album-name
with
domain.org/about-us/photoalbum/category/8-album-name

I'v tried something but result was infinite redirect or partial redirection only:

From URL: /component/phocagallery/(.*)$
To URL: {scheme}://{siteurl}/about-us/photoalbum/{preg_match 2}/component\/phocagallery\/(.*)/i{/preg_match}
Request only: true

How to achive result www.domain.org/about-us/photoalbum/category/name-of-the-album ?

Thanks a lot.

David

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

More
8 years 11 months ago #4543 by admin
Replied by admin on topic Replace part of the path
Try this:
From URL: ^/component/phocagallery/
To URL: {scheme}://{siteurl}/about-us/photoalbum/{pathltrim /component/phocagallery/}[queryfull}
Request only: true (checked)

Kind regards,
Luigi
The following user(s) said Thank You: davidmach

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

  • davidmach
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 11 months ago #4545 by davidmach
Replied by davidmach on topic Replace part of the path
It works now! Thnaks a lot.

David

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

More
8 years 11 months ago #4547 by admin
Replied by admin on topic Replace part of the path
U're welcome.

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

Time to create page: 0.122 seconds