× Here you can get community support related to ReDJ.

Can ReDJ do this?

  • LMKWeb
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 week ago #3301 by LMKWeb
Can ReDJ do this? was created by LMKWeb
I'm developing a site with two templates and have run into an issue that appears tied to Item IDs for categories. I'm looking for a way to redirect all category links to the SEF URL, so for example:

[Site Root]/10-category-name/11-article-name
would redirect to
[Site Root]/category-name/11-article-name

My problem is that if the category ID appears in the URL, the site loads the wrong template. By redirecting to the SEF URL, it loads the correct template.

What type of redirect would this be, a 301 or internal?

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

More
10 years 1 week ago #3302 by admin
Replied by admin on topic Can ReDJ do this?
Hi,
ReDJ can do this and you can do with a 301 or a 200 (internal) redirect. Consider that the latter is available only on the Enterprise version. In any case, it is better to first try a rule with a 301 to see if it works, then change to 200. The redirection rule is:
From URL: ^/10-category-name/
To URL: {scheme}://{siteurl}/category-name/{pathltrim /10-category-name/}{queryfull}
Request only: true (checked)

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

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

More
9 years 4 months ago #4055 by bonaventure
Replied by bonaventure on topic Can ReDJ do this?

I'm developing a site with two templates and have run into an issue that appears tied to Item IDs for categories. I'm looking for a way to redirect all category links to the SEF URL, so for example:

[Site Root]/10-category-name/11-article-name
would redirect to
[Site Root]/category-name/11-article-name

My problem is that if the category ID appears in the URL, the site loads the wrong template. By redirecting to the SEF URL, it loads the correct template.

What type of redirect would this be, a 301 or internal?


I'm curious, did you ever figure out why the category ID was appearing in your SEF URLs. I'm having a bugger of a time configuring Smart Search because it is doing exactly what you described despite all my efforts to make it work. There's no reason for Joomla to add the leading category ID when I've defined all of my categories and articles in menu items. Very strange.

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

More
9 years 4 months ago - 9 years 4 months ago #4057 by admin
Replied by admin on topic Can ReDJ do this?
As far as I know, Joomla routing for content needs the category id and the article id to work, unless you associate the article or the category to a menu item. Check yourself the router.php file inside the com_content folder.
Last edit: 9 years 4 months ago by admin.

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

  • LMKWeb
  • Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 4 months ago #4060 by LMKWeb
Replied by LMKWeb on topic Can ReDJ do this?

I'm curious, did you ever figure out why the category ID was appearing in your SEF URLs. I'm having a bugger of a time configuring Smart Search because it is doing exactly what you described despite all my efforts to make it work. There's no reason for Joomla to add the leading category ID when I've defined all of my categories and articles in menu items. Very strange.


This does seem odd. I got the search to work by assigning the search results page to the correct template, and making sure every single category is in a menu, hidden or otherwise. I don't have any IDs showing up for categories anymore, but they do still show up for articles that aren't included on a menu. I find it annoying! One workaround is installing the "add to menu" plugin by NoNumber, so at least it's easy to add everything to a menu.

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

More
9 years 4 months ago #4061 by bonaventure
Replied by bonaventure on topic Can ReDJ do this?
I found the problem.
My menu items were assigned to "Special" during development. The router appended the category ID (I assume) so that it could deny anyone that wasn't an administrator. One would think that it should work for the admin while logged in. In any event, as soon as I made my menu items public, flushed smart search results, and re-indexed, everything worked as expected. Thank you all for your suggestions.

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

Time to create page: 0.130 seconds