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

**URL:** <https://discourse.cakephp.org/t/change-url-like-http-ip-address-mywebsite-index-php-controllername-actionname-param/4063>\
**Category:** Need Help\
**Created:** [March 19, 2018, 9:11am UTC](https://discourse.cakephp.org/t/change-url-like-http-ip-address-mywebsite-index-php-controllername-actionname-param/4063 "2018-03-19T09:11:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![birdman](https://avatars.discourse-cdn.com/v4/letter/b/90ced4/32.png) [@birdman](https://discourse.cakephp.org/u/birdman)\
**Post date:** [March 19, 2018, 9:11am UTC](https://discourse.cakephp.org/t/change-url-like-http-ip-address-mywebsite-index-php-controllername-actionname-param/4063/1 "2018-03-19T09:11:24Z")

</div>

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'])); ?\>

---

<div class="post-metadata">

**Author:** ![patsuckow](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/patsuckow/32/992_2.png) [@patsuckow](https://discourse.cakephp.org/u/patsuckow)\
**Post date:** [April 13, 2018, 12:18pm UTC](https://discourse.cakephp.org/t/change-url-like-http-ip-address-mywebsite-index-php-controllername-actionname-param/4063/2 "2018-04-13T12:18:24Z")

</div>

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](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'])); ?\>
