× Here you can get community support related to ReDJ.

Trying to add folder to url for all articles

  • BodgeIT
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 5 months ago - 11 years 5 months ago #1137 by BodgeIT
Hi,
I'm trying to redirect:
/sjs-news/item/any-document-name

to
/anotherfolder/sjs-news/item/any-document-name


Probably very easy but just so many options am I little confused...

Thanks
Gary
Last edit: 11 years 5 months ago by BodgeIT.

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

  • BodgeIT
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 5 months ago #1138 by BodgeIT
Replied by BodgeIT on topic Trying to add folder to url for all articles
Forgot to mention, I'm using J2.5 and SEF activated with htaccess rewrite method.

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

More
11 years 5 months ago #1139 by admin
Try this rule:
From URL: ^/sjs-news/item/any-document-name
To URL: http://{siteurl}/anotherfolder/sjs-news/item/any-document-name
Request only: true (must be checked)

The caret (means start with) allows to avoid loops.

Kind regards,
Luigi

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

  • BodgeIT
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 5 months ago #1144 by BodgeIT
Replied by BodgeIT on topic Trying to add folder to url for all articles
Hi Luigi,
This looks to be a redirect for an individual article.
I need "any-document-name" to be a wild card...i.e. all articles in a category.
For From and To

Cheers
Gary

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

More
11 years 5 months ago #1149 by admin
Ooops, sorry. I didn't understand your request. So you need to build the destination dinamically:
From URL: ^/sjs-news/item/any-document-name
To URL: http://{siteurl}/anotherfolder{path}{queryfull}
Request only: true (must be checked)

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

  • BodgeIT
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
11 years 5 months ago #1153 by BodgeIT
Replied by BodgeIT on topic Trying to add folder to url for all articles
OK, so the From code should be:
^/sjs-news/item/

?

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

Time to create page: 0.118 seconds