开发者

Deploying CakePHP on sub domain redirects to wrong location

开发者 https://www.devze.com 2023-03-02 11:02 出处:网络
I am trying to deploy my locahost CakePHP website to a subdomain. I am able to view the website but it is not working correctly when I try to login or register.

I am trying to deploy my locahost CakePHP website to a subdomain. I am able to view the website but it is not working correctly when I try to login or register.

It does not show me any validation error nor does it allow me to login or register and it is landing on the below URL:

subdomain.example.com/webroot/index.php?url=users/login 

where it should be something like:

开发者_Python百科
subdomain.example.com/users/login

I am using Go Daddy shared hosting.


The older settings defined at http://bakery.cakephp.org/articles/cguyer/2009/10/18/mod-rewrite-on-godaddy-shared-hosting has solved the issue.

Thank you every one for your help.


This sounds (and looks) like an Apache rewrite issue. There are a couple of things you need to look at:

  1. Check to make sure the .htaccess files are were they are expected. You should have one in the app directory and another in the webroot directory. Sometimes when we compress and/or transfer files to the webserver, the .htaccess files get left behind.

  2. Make sure that the server you are running the site on has rewrite turned on. This may require that you call support at Go Daddy. But my experience is they are always willing to help.

Good luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号