Magento入门基础 - - 更改URL,去掉index.php

2023-05-15,,

安装完成Magento之后,是不是会很兴奋。

别急,先进入后台Syetem,发现很多个选项了没有。首先找到Cache Storage Management,关闭缓存。

然后更改网站网址URL,去掉www.xxxx.com/index.php后面的index.php

第一,进入system -> configuration-> web  -> Use web server rewrites 更改为Yes

(这个时候你打开前台会出现404error错误提示)

第二,在网站根目录下,找到.htaccess文件。打开并添加以下内容:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_URI} !^/var/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . index.php [L]

保存后刷新缓存。

这样子就大功告成了!

大家一起学magento ,欢迎一起学习进步。

关注本人微信kimsum,或者龟窝官方微信guiwoo178。

《Magento入门基础 - - 更改URL,去掉index.php.doc》

下载本文的Word格式文档,以方便收藏与打印。