2013-06-05 38 views

回答

15

可以删除index.php文件在执行中Magento的管理部分下面的步骤前台网址:

系统 - >配置 - >网络 - >搜索引擎优化,选择YES

编辑/installdir/.htaccess并取消行:

RewriteBase /magento/ 

在我的情况下子目录的Magento是在被称为magento,所以将其更改为你的子目录路径,如果它是不同的。

+0

HTTP: //cmsblogheart.wordpress.com/2014/02/27/how-to-remove-index-php-form-url-in-magento/ –

+0

除了上面的内容,请确保你的Apache中启用了mod_rewrite。 – Harit

+0

你可能会发现这篇文章有用,如果你有现有的链接,包括** index.php ** - 这可以防止在该网站内使用index.php [从您的URL完全删除index.php](http:// secure.nerdster.com.au/knowledgebase/109/Removing-the-indexphp-from-your-URL-completely-.html) – jpruizs

3

您可以删除的index.php中前端网址执行以下步骤:

转到Magento的管理部分。

  1. 在系统 - >配置 - >网络 - >搜索引擎优化, 选择YES。

  2. 在系统 - >配置 - > Web - >安全 - >在前台使用安全URL ,选择YES。

  3. 编辑/installdir/apps/magento/htdocs/.htaccess并取消 行:

    RewriteBase/Magento的/

+0

它如何给在本地? –

1

可以删除在index.php前端网址执行以下步骤:

转到Magento的管理部分。

In System -> Configuration -> Web -> Search Engines Optimizations, select YES. 

清除缓存现在查看它的工作。如果任何情况下做notwork去到ftp

找到文件在根的.htaccess

检查这条线应该是例如

RewriteBase/magento/ 

与此代码替换注释。

#RewriteBase /magento/ 
0

EX:您的网站网址是:http://localhost/my_site/demo1/

然后将它添加到(或创建)的.htaccess(/my_site/demo1的/的.htaccess)

RewriteEngine On 
RewriteBase /my_site/demo1/ 
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /my_site/demo1/index.php [L]