簡體   English   中英

只有index.php在magento網站上工作,該如何解決?

[英]Only index.php working in magento site, how to tackle this?

我通過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

所以請提出我可能會錯的地方

請幫忙。

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模塊才能使用此配置。

檢查.htaccess文件是否存在,並在您的主機設置中允許該文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM