【问题标题】:https url require index.php in the url. How to fix this?https url 在 url 中需要 index.php。如何解决这个问题?
【发布时间】:2014-02-19 08:19:37
【问题描述】:

我们有一个 magento 网站 www.oursite.in,当我使用 http://www.oursite.in/mobiles.html 时,它工作正常(即 index.php 不是必需的/不会出现在 url 中)。

但是当我输入 https://www.oursite.in/mobiles.html 时,它显示 404 not found error https://www.oursite.in/index.php/mobiles.html 工作正常。

如何在 .htaccess 中为 https url 重写 url?

magento 中还有其他配置更改吗?

有人可以帮我解释一下吗?

【问题讨论】:

  • 你好 Shathish,请转到 admin>system>configuration>Web 在安全和安全 url 下将基本 url 更改为 oursite.in
  • @AmitBera:我已经这样做了。

标签: .htaccess magento url-rewriting


【解决方案1】:

下面的链接解释了 https 的 htaccess,虽然它适用于 codeigniter 开发人员,但它适用于 magento to..

http://ellislab.com/forums/viewthread/86113/

RewriteRule ^(.*)$ index.php/$1 //这行会隐藏 url 中的 index.php

 <IfModule mod_rewrite.c>
    RewriteEngine on
    Options +FollowSymLinks
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1   
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>  

【讨论】:

    猜你喜欢
    • 2016-10-04
    • 2011-06-13
    • 1970-01-01
    • 2011-05-06
    • 1970-01-01
    • 2013-11-03
    • 2012-02-01
    • 2020-08-06
    相关资源
    最近更新 更多