Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
只有index.php在magento站点中工作,如何解决这个问题?_Php_Magento_Iis - Fatal编程技术网

只有index.php在magento站点中工作,如何解决这个问题?

只有index.php在magento站点中工作,如何解决这个问题?,php,magento,iis,Php,Magento,Iis,我已经通过iis在本地创建了一个magento存储。但只有index.php文件或主页在工作。其他页面未打开 这是我在chrome中生成的错误 HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. Module IIS Web Core Notification MapRequ

我已经通过iis在本地创建了一个magento存储。但只有index.php文件或主页在工作。其他页面未打开

这是我在chrome中生成的错误

HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Module  IIS Web Core
Notification    MapRequestHandler
Handler StaticFile
Error Code  0x80070002
Requested URL   http://scannerbattery.net:80/checkout/cart/add/uenc/aHR0cDovL3NjYW5uZXJiYXR0ZXJ5Lm5ldC9pbmRleC5waHA,/product/556/
Physical Path   E:\Sanjay\ScannerBattery\checkout\cart\add\uenc\aHR0cDovL3NjYW5uZXJiYXR0ZXJ5Lm5ldC9pbmRleC5waHA,\product\556\
Logon Method    Anonymous
Logon User  Anonymous
所以请建议我哪里可能是错的


请提供帮助。

检查.htaccess文件是否存在,以及您的主机设置是否允许该文件。

Magento使用自己的URL路由系统,因此web服务器必须以某种方式将所有请求(静态请求除外)传递到此系统。通常,您需要对web服务器使用一些URL重写方法

可以使用应用程序目录中的web.config文件配置IIS。您可以尝试以下方法:

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
    <system.webServer> 
        <rewrite> 
            <rules> 
                <rule name="Imported Rule 1” stopProcessing="true"> 
                    <match url=".*" ignoreCase="false"/> 
                    <conditions> 
                        <add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" /> 
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
                    </conditions> 
                    <action type="Rewrite" url="index.php" /> 
                </rule> 
            </rules> 
        </rewrite> 
    </system.webServer> 
</configuration>

您需要安装UrlRewrite IIS模块才能使用此配置。

到目前为止您尝试了什么?这可能有助于您正确阅读问题,用户使用的是IIS服务器,而不是apacheSory。在这种情况下,请查看ISAPIRewrite或检查/配置您自己的重写模块。