Hi,

In my machine, I have cakephp application ( I put it in folder ) which
I can accessed in this url:
http://localhost:2999/php/uhicake

So the controller, action and parameter would be like this:
http://localhost:2999/php/uhicake/controller/action/id

For example: http://localhost:2999/php/uhicake/products/element/4

I have mod_rewrite in my apache in my box.

Then I try to host my app in my web hosting. I put it in:
document_root/projects/uhi
Then I hope I can access my web by this url:
http://www.mywebhostingblabla.com/projects/uhi

But it does not work because it does not have mod_rewrite so I comment
out ( uncomment ) this line in app/config/core.php:
 define ('BASE_URL', env('SCRIPT_NAME'));

But again this url does not work:
http://www.mywebhostingblabla.com/projects/uhi
I try this, and it does not work:
http://www.mywebhostingblabla.com/projects/uhi/index.php/
or this:
http://www.mywebhostingblabla.com/projects/uhi/index.php

After doing brute force attack, this url does work:
http://www.mywebhostingblabla.com/projects/uhi/app/webroot/index.php/

Everything works except for minor issue. I have action to change
language like this:
  function change_language($id)
  {
    $this->controller->Session->write('lang', $id);
    $this->controller->redirect($this->controller->referer());
  }

So if I am in this url:
http://www.mywebhostingblabla.com/projects/uhi/app/webroot/index.php/products/element/5
I click the link which doing change_language action, I was redirect to
this url:
http://www.mywebhostingblabla.com/projects/uhi/app/webroot/index.php/
not this url:
http://www.mywebhostingblabla.com/projects/uhi/app/webroot/index.php/products/element/5

In my localhost, i was redirect to the same page just as it should be.

So the questions are:
1. How could I make my url like this:
http://www.mywebhostingblabla.com/projects/uhi/index.php/  ( without
/app/webroot/ )
2. Why am I not redirect to same page without mod_rewrite using this
function:
$this->controller->redirect($this->controller->referer());

Thank you.

version cake:
1.1.3.2967

version php:
4.4


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to