× Here you can get community support related to ReDJ.

Redirect from an old folder to a new one

  • vahid.d
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago - 8 years 10 months ago #4023 by vahid.d
Hi. first,thank you for your useful product.

i see your documention and example for my subject in this link:

www.selfget.com/documentation/redj-joomla25/examples-and-solutions-to-common-problems.html

this example work very good in my test:
From URL: ^/category/oldfolder/
To URL: {scheme}://{siteurl}/category/newfolder/{pathltrim /category/oldfolder/}{queryfull}
Request only: true (checked)

but i think there is a problem with url which have persian words. in my case i want forward this and all article's bellow it:
mydomain.com/category1/subcategory/(article's)

to
mydomain.com/category2/subcategory/(article's)

(or maybe change name of subcategory in few case)

and these word's in persian are:
category1 = اخبار
subcategory = گزارش
category2 = تحلیل و بررسی
title for a test article  = عنوان برای یک مطلب تست
so SEF url of FROM is:
http://www.domain.com/اخبار/گزارش/عنوان-برای-یک-مطلب-تست

and sef url of TO is:
http://www.domain.com/تحلیل و بررسی/گزارش/عنوان-برای-یک-مطلب-تست

(as you can see, in persian SEF url, catagory is in right section of url and then subcatagory and title is beside of domain name)

so i use bellow strings for redirect:
FROM: ^/اخبار/گزارش/

TO:  {scheme}://{siteurl}/تحلیل-و-بررسی/گزارش/{pathltrim /اخبار/گزارش/}{queryfull}
But result is:
www.domain.com/تحلیل-و-بررسی/گزارش//اخبار/گزارش/
is there any solotion for this issue?

thank you
Last edit: 8 years 10 months ago by vahid.d.

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

More
8 years 10 months ago #4024 by admin
Replied by admin on topic Redirect from an old folder to a new one
Sorry,
but pathltrim removes a piece from left, while as you say, you have an inverse order. I have no experience on Persian, but try to use pathrtrim instead.

Regards

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

  • vahid.d
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #4025 by vahid.d
Replied by vahid.d on topic Redirect from an old folder to a new one
Hi and thank you for answer. i tested pathrtim too. but i recieved same result. is there any command to remove it from every where it is? right or left or center

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

More
8 years 9 months ago #4032 by admin
Replied by admin on topic Redirect from an old folder to a new one
Sorry, not in the community version. I will try to play with Persian URLs a little, in case I will advise you.
The following user(s) said Thank You: vahid.d

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

Time to create page: 0.114 seconds