Change URL like :http://ip address/mywebsite/index.php?controllername/actionname/param

Thanks in advance everyone.

here’s my website link:

Server : linux centos / nginx 1.8.0 / php 5.4.1
I can’t set rewrite, In fact, I’ve spent a long time setting up rewrite on nginx, but it’s not always working. I’m planning to abandon rewrite.

  1. uncomment the line that looks like:
    Configure::write(‘App.baseUrl’, env(‘SCRIPT_NAME’));
    2.Also remove these .htaccess files:
  2. change / to ?
    old : $output = str_replace(’//’, ‘/’, $base . ‘/’ . $output);
    now :$output = str_replace(’//’, ‘/’, $base . ‘?’ . $output);

in the list of links on the homepage, after clicking, it does not jump to the target page. The content of the home page is always displayed. How can jump to the target page via the link? Thank you

Controller : SiteController.php
Action : language

view: Site/language.ctp

<?php echo $this->Html->link($language['name'], array('controller' => 'site', 'action' => 'language', $language['id'])); ?>

Controller : SiteController.php - is wrong!
SitesController.php - The controller names must be in the plural.


And then:

<?php echo $this->Html->link($language['name'], array('controller' => 'sites', 'action' => 'language', $language['id'])); ?>