【问题标题】:Magento Remove index.php from URLMagento 从 URL 中删除 index.php
【发布时间】:2014-02-18 15:53:59
【问题描述】:

我在一个 Magento 中安装了多个网站,对于一个网站,我有一个完整视图商店 (www.example.com) 和移动视图商店 (www.example.com/mobile)。我已经从完整商店中删除了 index.php,但不知何故,它无法从移动商店中删除,我仔细检查了,(1)使用 Web 服务器重写设置为是(2)在前端使用安全 URL 为是( 3) .htacess Rewrite Engine on 和 RewriteBase/。我多次清除了 Magento 缓存,甚至重新编制了索引。为什么index.php还在?

这是 .htacess 文件的一部分。

## enable rewrites
    Options +FollowSymLinks
    RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
   RewriteBase / 

【问题讨论】:

标签: magento


【解决方案1】:

从 url 中删除 index.php 的步骤很少

Step1:Admin>System > configuration>General>WEb>Search Engine optimization 

Use Web Server Rewrites enable to yes 同时启用 apache 的 mod_write

【讨论】:

  • 感谢您的回复,我做了所有这些,但没有工作。
  • 如何启用 apache 的 mod-write?我应该联系虚拟主机吗?
【解决方案2】:

按照以下步骤从 Magento 中的 URL 中删除 index.php

Step 1:
* Goto to your site root folder and you can find the htaccess file there.Open it on text editor and find the line #Rewrite Base/magento.
* Just replace it with Rewrite Base/

Step 2:
* Then goto your admin panel and enable the Rewrites(set yes for Use Web Server Rewrites).
* You can find it at System->Configuration->Web->Search Engine Optimization.

Step 3:
* Then goto Cache management page (system cache management ) and refresh your cache and refresh to check the site.

【讨论】:

  • 从变量中删除缓存文件夹。从您的后端转到系统->缓存管理刷新缓存。我的解决方案应该可以工作,我已经使用过很多次了。
  • 已从 Magento 清除缓存和刷新缓存,但仍然无法正常工作......它是如此有线......
【解决方案3】:

【讨论】:

    猜你喜欢
    • 2015-07-26
    • 2013-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-18
    • 2012-01-17
    • 2016-05-14
    相关资源
    最近更新 更多