I have a new question related to this question , but since the questions do not coincide at all, I am creating this new topic. But this is a good recommendation.
I changed my mind regarding logsto log, logsokay. But I have another controller called WikisController, in which case I would really like to change the URL. I just hate what the URL will be example.com/wikis/subject.html, I want it to be example.com/wiki/subject.html. It is much cleaner, and the agreement now matches 100% with other sites where it is also called wiki, and not wikis. But I want the controller to be called WikisControllerdue to convention CakePHP.
Well, now the real problem arises. I am currently using the following routing in Config/routes.php:
Router::connect('/wiki/:action/*', array('controller' => 'wikis'));
Router::connect('/wiki/*', array('controller' => 'wikis'));
This is part of the code used by the solution in another topic . But now I have a problem. Well, this is not a very big problem, because everything is working fine. But I do not like the URL.
When I create a link somehow from example.com/wiki/edit.html:
echo $this->Html->link('Wiki overview', array(
'controller' => 'wikis',
'action' => 'index',
'ext' => 'html'
));
It creates a link to example.com/wiki/index.htmlcompletely fine, and it works, but I donβt want to show index.html, I just donβt do it. This word is additional in the URL, and the user does not need to understand where it is.
link controller action - , . action, example.com/edit.html, , . action => index . , , . Index = index . , , URL- , action .
:
, , example.com/flights/index.html example.com/flights/add.html, /index URL- URL- example.com/flights.html, .
- , , .