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

Thanks in advance everyone.

here’s my website link:
[REMOVED]

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:
    /.htaccess
    /app/.htaccess
    /app/webroot/.htaccess
  2. change / to ?
    old : $output = str_replace(’//’, ‘/’, $base . ‘/’ . $output);
    now :$output = str_replace(’//’, ‘/’, $base . ‘?’ . $output);

problems:
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!
Needed:
SitesController.php - The controller names must be in the plural.

see https://book.cakephp.org/3.0/en/intro/conventions.html

And then:

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