php HTTP 错误 404.0 - 未找到您要查找的资源已被删除、更名或暂时不可用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22037766/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable
提问by Md. Abdur Razzak
I have developed a project on codeigniter a phpframework. It's working perfectly on my localhost where xampp is running. But right now the client want it on IIS windows server. I have uploaded my whole project in the "wwwroot" folder and I can only get my opening page. But when I try to click on any link I get:
我在codeigniter上开发了一个phpframework项目。它在运行 xampp 的本地主机上运行良好。但是现在客户端希望它在 IIS Windows 服务器上。我已经将我的整个项目上传到“wwwroot”文件夹中,但我只能得到我的打开页面。但是当我尝试点击任何链接时,我得到:
HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable..
HTTP 错误 404.0 - 未找到您要查找的资源已被删除、更名或暂时不可用。.
Here is my problem link to show image http://www.flickr.com/photos/118792012@N04/12790173834/
这是我显示图片的问题链接 http://www.flickr.com/photos/118792012@N04/12790173834/
Here is my server configuration:
这是我的服务器配置:
server: IIS7
O/S: Windows7-64bit
Environment: Runing on my own laptop
环境:在我自己的笔记本电脑上运行
Update: Here is my htaccess file configuration-
更新:这是我的 htaccess 文件配置-
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On
# If your website begins from a folder e.g localhost/my_project then
# you have to change it to: RewriteBase /my_project/
# If your site begins from the root e.g. example.local/ then
# let it as it is
RewriteBase /mobile_masala/
# Protect application and system files from being viewed when the index.php is missing
RewriteCond ^(application|system|private|logs)
# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/ [PT,L]
# Allow these directories and files to be displayed directly:
RewriteCond ^(index\.php|robots\.txt|favicon\.ico|public|assets|css|js|images)
# No rewriting
RewriteRule ^(.*)$ - [PT,L]
# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/ [PT,L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
采纳答案by A. K. M. Tariqul Islam
You may try this http://codefury.net/2011/01/codeigniter-php-iis-mysql-mssql/or search google https://www.google.com/search?q=iis+php+response+lag. Hope it'll work for you.
你可以试试这个http://codefury.net/2011/01/codeigniter-php-iis-mysql-mssql/或搜索谷歌https://www.google.com/search?q=iis+php+response+lag. 希望它对你有用。
回答by Ankit Kumar
Open your IIS management console at C:\WINDOWS\system32\inetsrv\iis.msc. Drill down to your web site, right-click and select Properties. Select the Home Directory tab, then click on the Configuration button. Select the Mappings tab. If you don't see a .php extension listed, click the Add button. Browse to the PHP 5 DLL (which may be at C:\Program Files\PHP\php5isapi.dll). Type .php into the Extension field and leave everything else at the default values. Click OK. The extension and executable path will be filled out and under Verbs you should see “All”
在 C:\WINDOWS\system32\inetsrv\iis.msc 打开 IIS 管理控制台。深入到您的网站,右键单击并选择“属性”。选择主目录选项卡,然后单击配置按钮。选择映射选项卡。如果您没有看到列出的 .php 扩展名,请单击添加按钮。浏览到 PHP 5 DLL(可能位于 C:\Program Files\PHP\php5isapi.dll)。在扩展字段中输入 .php 并将其他所有内容保留为默认值。单击确定。将填写扩展名和可执行路径,在动词下您应该看到“全部”

