Probably you’ve misunderstood the concept. The URL rule is not something like URL Rewrite Rule in web server configuration. The basic concept of the URL rules is URL Pattern => Route Pattern, where route is controller/action or module/controller/action.
So maybe I’m crazy but I just noticed something. ([’/dashboard’]) redirected to /home (which 404’d since I have nothing set up there). Then when I changed it to (’/dashboard’), it redirected to the dashboard correctly.
Is this what you meant? That I triggered some kind of [controller/action/variable] which set off the URL manager?
Now I’m not sure the URL Manager can achieve what I want. Would I be better off using URL rewrite? I thought the URL Manager could change the visible URLs to make them more user-friendly, since I’ve already changed the interface names for these things and all that’s left is to change the URLs for consistency.
In the case of the dashboard, I want users to navigate to the dashboard by going to domain.com/home
Not just being redirected to the dashboard. I want the URL in their address bar to say domain.com/home
As another example, I have renamed Humhub’s built-in “Security” settings to “Privacy”, as I feel that’s more accurate. But the URL still reads security, as in the screenshot above. It’s more of an issue of consistency in details than anything else.
I really thought this would be fairly straightforward and a lot less complicated than it turned out to be.
That’s because I don’t care about routes. I’m talking about URLs because that’s my interest. I don’t understand why you keep talking about routes when I’ve explained 4 times now what I’m trying to achieve.
Humhub is clearly not relevant either but you’re clearly one of those unhelpful kinds of people so have a good day.
@Ace2213, please read the following before you leave Yii (and HumHub).
I took a look at HumHub, and it seems to be a kind of CMS specialized in social networking. It is built on top of Yii, and its functionality (“dashboard”, “directory”, “space” … etc.) are implemented as modules if I’m not mistaken.
I couldn’t find much about URL management in HumHub’s documentation. It only tells you that you can enable the pretty url by configuring Yii’s URL Manager. I think it is reasonable to expect that URL Rules of Yii will work as expected also in HumHub.
So, what you wrote was this:
None of the rules worked, as you say. IMO it’s because you have failed to set the route parts. They are not in valid format for route. It means that the listed URLs have no matching routes.
Nonetheless, the pretty url as a whole worked as expected. It’s because enableStrictParsing is set to false. As you see in the guide:
The rule above means that the URL of /space/manage/privacy should be resolved as the route of space/manage/security, i.e., ‘space’ module’s `manage’ controller’s ‘security’ action. I hope it will work as expected.
As for the other 2 rules, I can’t say anything because I don’t have enough information regarding their routes.