如何从Magento中的URL中删除index.php。如何从Magento中的URL中删除index.php
例如主页网址是:www.mydomain.com/index.php
我想表明:www.mydomain.com
那么,有没有办法做到这一点Magento的管理面板英寸
如何从Magento中的URL中删除index.php。如何从Magento中的URL中删除index.php
例如主页网址是:www.mydomain.com/index.php
我想表明:www.mydomain.com
那么,有没有办法做到这一点Magento的管理面板英寸
可以删除index.php文件在执行中Magento的管理部分下面的步骤前台网址:
在系统 - >配置 - >网络 - >搜索引擎优化,选择YES。
编辑/installdir/.htaccess
并取消行:
RewriteBase /magento/
在我的情况下子目录的Magento是在被称为magento
,所以将其更改为你的子目录路径,如果它是不同的。
登录Magneto Admin门户。转至系统 >>配置。选择选项Web从通用左侧选项卡。使用选项是田间使用服务器网址重写的标签搜索引擎优化
此外,根据检查答案后https://stackoverflow.com/questions/12234767/my-magento-pages-wont-work-unless-index-php-is-in-url
您可以删除的index.php中前端网址执行以下步骤:
转到Magento的管理部分。
在系统 - >配置 - >网络 - >搜索引擎优化, 选择YES。
在系统 - >配置 - > Web - >安全 - >在前台使用安全URL ,选择YES。
编辑/installdir/apps/magento/htdocs/.htaccess并取消 行:
RewriteBase/Magento的/
它如何给在本地? –
可以删除在index.php前端网址执行以下步骤:
转到Magento的管理部分。
In System -> Configuration -> Web -> Search Engines Optimizations, select YES.
清除缓存现在查看它的工作。如果任何情况下做notwork去到ftp
找到文件在根的.htaccess
检查这条线应该是例如
RewriteBase/magento/
与此代码替换注释。
#RewriteBase /magento/
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]
HTTP: //cmsblogheart.wordpress.com/2014/02/27/how-to-remove-index-php-form-url-in-magento/ –
除了上面的内容,请确保你的Apache中启用了mod_rewrite。 – Harit
你可能会发现这篇文章有用,如果你有现有的链接,包括** index.php ** - 这可以防止在该网站内使用index.php [从您的URL完全删除index.php](http:// secure.nerdster.com.au/knowledgebase/109/Removing-the-indexphp-from-your-URL-completely-.html) – jpruizs