【问题标题】:I don't have .htaccess file for my magento installation. How to get .htaccess file to remove the "index.php" from URL我的 magento 安装没有 .htaccess 文件。如何获取 .htaccess 文件以从 URL 中删除“index.php”
【发布时间】:2015-07-28 10:48:52
【问题描述】:

我没有用于我的 magento 安装的 .htaccess 文件,默认情况下所有新的 magento 安装都存在该文件。

现在我必须从我的网站网址中删除“index.php”,并发现需要编辑 htaccess 文件。但是,我的 magento 根文件夹中没有 .htaccess 文件。

另外,我对网站做了很多更改,不想重新安装来获取 .htaccess 文件。

另外,当我访问我的管理面板时,URL 中还需要“index.php”。

请,有人可以帮我解决这个问题。

【问题讨论】:

    标签: .htaccess magento


    【解决方案1】:

    要从 URL 中删除 inde.php,您需要启用 Web 服务器重写。

    您可以通过以下步骤启用 Web 服务器重写:

    1. 登录后台,从顶部导航点击System >> Configuration >> Web
    2. Search Engines Optimization 组中选择Use Web Server RewritesYES

    如果您需要.htaccess 文件,您可以下载兼容的magento zip 文件并使用它的.htaccess。无需为此安装 magento。

    【讨论】:

    • 那么,新的 .htaccess 文件会破坏我网站上的任何内容吗?
    • 不,据我所知,它不会破坏您的网站
    • 为什么不直接从 magento.com 下载您的 magento 版本并从包中获取 htaccess 文件?
    • 我现在启用了使用 Web 服务器重写为 YES,现在当我访问页脚链接“关于我们”时,它会显示 404:未找到文件。
    • 你的magento版本是什么?
    猜你喜欢
    • 1970-01-01
    • 2013-05-15
    • 1970-01-01
    • 2020-02-08
    • 2019-07-08
    • 2018-06-12
    • 2011-05-20
    • 2017-03-15
    相关资源
    最近更新 更多