× Here you can get community support related to ReDJ.

Internal Redirect from /name to /user-id&menue-id

  • franz.wohlkoenig
  • franz.wohlkoenig's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #4007 by franz.wohlkoenig
Internal Redirect from /name to /user-id&menue-id was created by franz.wohlkoenig
Hi Luigi,

first Thanks for this great PlugIn and your Support. I have read in Forum and your Support is impressiv.

To be safe to understand corrrect 1st Question: A Internal Redirect to "index.php?option=com_k2&view=itemlist&task=user&id=111:firstlastname&Itemid=1111" would show Frontend-users "www.mydoman.com/road/to/users/first-lastname"?

2nd to-be-sure-Question: A Redirect-Rule can "read" a Username (sometimes written with last name, sometimes first-lastname) in #_user to look for user-id an redirect to Menue of User?

As i read in Forum both is possible - correct?

Regards

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

More
8 years 10 months ago - 8 years 10 months ago #4008 by admin
Hi and thanks.
About the first question, I guess you would like to show the URL:

www.mydoman.com/road/to/users/first-lastname

In the browser but the real URL for the content is under the "less-friendly":

index.php?option=com_k2&view=itemlist&task=user&id=111:firstlastname&Itemid=1111

In this case you can create an internal redirect as follow:
From URL: ^/road/to/users/first-lastname$
To URL: {scheme}://{siteurl}/index.php?option=com_k2&view=itemlist&task=user&id=111:firstlastname&Itemid=1111
Request only: true (checked)
Redirect type: 200 (internal)

You can try the rule first with a 301 redirect to check it works, then you can change to 200. Consider that the internal redirect is an Enterprise feature.

About the second question, you can use a lot of macros and placeholders to build the destination step-by-step, taking parts of the source URL like the username, looking in the database with a lookup query, and use the result in the destination URL. This question leads me to think the first-lastname at the previous point is a variable. In this case the rule should be improved with macros.

Kind regards,
Luigi
Last edit: 8 years 10 months ago by admin.

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

  • franz.wohlkoenig
  • franz.wohlkoenig's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago - 8 years 10 months ago #4009 by franz.wohlkoenig
Replied by franz.wohlkoenig on topic Internal Redirect from /name to /user-id&menue-id
Hi Luigi,

"This question leads me to think the first-lastname at the previous point is a variable. In this case the rule should be improved with macros."

Right. To make it short: 600 Users can be searched like "/lastname" or "/first-lastname" or "/last-firstname" (whatever Users try) which i would cover by ReDJ. Reading this Forum i got Idea to look for User-id (and cover Result by Internal Redirect which is provided by EnterpriseReDJ, that i will buy, if i got it working*g). Also Names changes so its better to search for a stable Indicator like User-id.

As you wrote i can build it with Macros and Placeholders with Community-ReDJ and need Enterprise only for Internal Redirect? Asking because there are a few Macros only for Enterprise (all of them i understand not at this Time), so maybe i have to buy first and then try?

Thanks Luigi for Answer.

Regards
Last edit: 8 years 10 months ago by franz.wohlkoenig. Reason: make Questions clear

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

More
8 years 10 months ago #4010 by admin
Ok,
I think you have all you need (as macros) in the Community version, so you could first check if it is good for you (with a 301 redirect). The matching part of the rule should be:
From URL: ^/road/to/users/

After this, we should extract the name part and look in the database. But you should provide more details about this. As you can imagine, the structure must be defined (e.g. first-lastname) and it should also be unique. In this case we could think to lookup the user table to get the user id. Is this your case?

Sincerely,
Luigi

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

Time to create page: 0.111 seconds