开发者

CakePHP URL rewriting in root (HTdocs) folder MAMP

开发者 https://www.devze.com 2023-03-17 19:28 出处:网络
I try to do what I thought to be the simplest thing ever: Download CakePHP 1.3.10 (also tried this unsuccessfully with 1.3.9), getting the content of the download folder and paste them in the htdocs f

I try to do what I thought to be the simplest thing ever: Download CakePHP 1.3.10 (also tried this unsuccessfully with 1.3.9), getting the content of the download folder and paste them in the htdocs folder in MAMP 1.9.6. (OSX 10.8).

I try to put my website in the MAMP htdocs root as it replicates the eventual production environment best: localhost/ www.example.com/

Nevertheless, when I go to localhost's root folder in my browser, I see the 'welcome to CakePHP' standard home开发者_运维知识库page without CSS and URL rewriting. I baked a model/controller/view (in this order) for a table.

When I try to reach this view (localhost/achievements)...I get the 'page does not exist' error.

This ALL worked when I put the website in a subfolder (original download folder).

I am stuck.

I have read about the following on this issue: possibly MAMP does not have permission from Apache htaccess issue (how can I change a .htaccess in CakePHP? can't find them)

10 beers for the winning answer, thanks!


I'll just guess that you copy and pasted the contents of the Cake folder, missing the .htaccess file that is hidden in Finder by default. Copy the entire contents of the folder using the terminal, including all hidden files.

$ cp Downloads/cake/* Sites
0

精彩评论

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