× Here you can get community support related to ReDJ.

Redirection

  • indeepblue
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 9 months ago #5959 by indeepblue
Redirection was created by indeepblue
Hello,

I have categories and menu links assigned to that categories.

For example i have an article

www.example.com/category/123-article.html

But i have some indexed links like this

www.example.com/category-1/123-article.html
www.example.com/category-2/123-article.html

How can i redirect these links to originals with ReDj?

Best Regards

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

More
7 years 9 months ago #5961 by admin
Replied by admin on topic Redirection
Something like this:
From URL: ^/category-[^/]+/
To URL: {scheme}://{siteurl}/category/{preg_match 1}/\/category-[^/]+\/(.*)$/{preg_match}
Request only: true (checked)

Kind regards
The following user(s) said Thank You: indeepblue

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

  • indeepblue
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 9 months ago #5966 by indeepblue
Replied by indeepblue on topic Redirection
Thank you for your kind reply but i couldn't explain my problem.

I have wrong indexed links like these;

www.website.com/categoryname/123-xyz.html
www.website.com/anothercategoryname/123-xyz.html

but true link is

www.website.com/truecategory/123-xyz.html

I want to redirect link which contains 123-xyz.html to www.website.com/truecategory/123-xyz.html

How can i do that?

Best regards

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

  • indeepblue
  • Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 9 months ago #5967 by indeepblue
Replied by indeepblue on topic Redirection
And i need to mention that i have many links like that, how can i do that without causing a loop

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

More
7 years 9 months ago #5972 by admin
Replied by admin on topic Redirection
Change the following rule according to your real paths:
From URL: /123-xyz\.html$
To URL: {scheme}://{siteurl}/realcategory/123-xyz.html
Request only:true (checked)
Skip: /realcategory/123-xyz\.html$

The last row is mandatory to avoid loops.

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

Time to create page: 0.156 seconds