0
votes

The url structure of my cakephp based site is mysite/cakephp/myapp/index.php/controller/action/input_paramaters

I cannot remove index.php from my url, as I dont have access to httpd.conf file.

Anyways, my question is that I just need to change the url of my homepage to something like http://mysite or mysite/myapp

How would I do that?

Thanks a lot!!

2

2 Answers

1
votes

The problem sounds to me that you don't have mod_rewrite enabled or Apache AllowOverwrite is not set properly.

If you don't have mod_rewrite then you cannot change the urls with the pretty ones (provided from CakePHP). If the AllowOverwrite is not set to On. Then even if you have mod_rewrite enabled, the .htaccess files in your directories doesn't take effect.

I don't know which is worst. Speak with your hosting provider and ask for help.

0
votes

It is not really clear to me which part of the URL changes. CakePHP routing applies only relative from the cake directory. So if you move from http://example.com/foo to http://www.example.org/bar nothing needs to be changed in Cake.

However you might have hardcoded some img/CSS/JS URL-s that needs some work now. I also use the HTML base tag so my app works perfectly fine under various base URL-s.