问题描述
我试图使CakePHP工作在Windows与IIS7,我无法得到它遵循官方文档:
I am trying to make CakePHP work over windows with IIS7 and i can not get it following the official documentation: http://book.cakephp.org/2.0/en/installation/advanced-installation.html#url-rewrites-on-iis7-windows-hosts
我已经从这里下载了IIS7的重写模块:
然后将其作为管理员安装。
I have downloaded the rewrite module for IIS7 from here:http://www.microsoft.com/en-us/download/details.aspx?id=7435And then installed it as admin.
我在cakephp主文件夹中创建了 web.config 文件。
I created the web.config file inside my cakephp main folder as said on the documentation.
我的结果是,当我尝试加载我的cakephp主文件夹与浏览器,它试图加载的wellcome.png图像的IIS7(失败加载它),它不加载任何项目或cakephp内容。
The result I'm having is that when i try to load my cakephp main folder with the browser, it tries to load the wellcome.png image of IIS7 (failing to load it) and it doesn't load any project or cakephp content.
如果我从我的邮件文件夹中删除 web.config 文件,cakephp加载,但它显示以下错误:
If i remove the web.config file from my mail folder, cakephp loads but it shows the the following error:
URL rewriting is not properly configured on your server.
1) Help me configure it
2) I don't / can't use URL rewriting
我做错了什么?任何想法?
谢谢。
What am I doing wrong? Any idea?Thanks.
推荐答案
好,我现在正在工作。
下载并安装IIS7的重写模块后,我必须做什么()
What i had to do, after downloading and installing the rewrite module for IIS7 ( http://www.microsoft.com/en-us/download/details.aspx?id=7435 )
- 在IIS中创建一个指向CakePHP项目文件夹的新网站
- 使用网址重写模块导入和应用.htaccess文件
- APP\webroot\.htaccess
- APP\.htaccess
<
就是这样。
希望这可以帮助任何人:)That's it.Hope this can help anyone :)
这篇关于CakePHP 2.2.2不能在Windows IIS7上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!