HTTP错误404.0 - 未找到您要查找的资源已被删除,名称已更改或暂时不可用

时间:2014-02-26 09:57:14

标签: php codeigniter iis-7 windows-7-x64

我已经在codeigniter和phpframework上开发了一个项目。它在我运行xampp的本地主机上完美运行。但是现在客户端想要它在IIS Windows服务器上。我已将整个项目上传到“wwwroot”文件夹,我只能打开我的初始页面。但是,当我尝试点击任何链接时,我得到:

HTTP错误404.0 - 未找到您要查找的资源已被删除,名称已更改或暂时不可用。

这是我显示图片的问题链接 http://www.flickr.com/photos/118792012@N04/12790173834/

这是我的服务器配置:

 server: IIS7
    O/S: Windows7-64bit

环境:在我自己的笔记本电脑上运行

更新:       这是我的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 $1 ^(application|system|private|logs)

# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]

# Allow these directories and files to be displayed directly:
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|public|assets|css|js|images)

# No rewriting
RewriteRule ^(.*)$ - [PT,L]

# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [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>

2 个答案:

答案 0 :(得分:0)

在C:\ WINDOWS \ system32 \ inetsrv \ iis.msc中打开IIS管理控制台。 深入查看您的网站,右键单击并选择“属性”。 选择Home Directory选项卡,然后单击Configuration按钮。 选择Mappings选项卡。如果未列出.php扩展名,请单击“添加”按钮。浏览到PHP 5 DLL(可能位于C:\ Program Files \ PHP \ php5isapi.dll)。在扩展字段中键入.php,并将其他所有内容保留为默认值。单击确定。扩展和可执行路径将被填写,在动词下你应该看到“全部”

答案 1 :(得分:-1)