Magento去除URL中的index.php

WBOY
發布: 2016-06-13 12:36:51
原創
878 人瀏覽過

Magento去掉URL中的index.php
1.修改APACHE2中的配置文件。

DocumentRoot /home/magento/
 <directory></directory>
  Options FollowSymLinks
  AllowOverride  All   这里修改成All


 <directory></directory>
  Options Indexes FollowSymLinks MultiViews
  AllowOverride All    这里修改成All
  Order allow,deny
  allow from all
 
登入後複製


2.启用apache2重写模块。
命令:#a2enmod rewrite

3.登录Magento后台系统,系统(System) => 配置(Configuration) => 网站(Web)=> 搜索引擎优化(Search Engines Optimization)=> 服务器重写(Use Web Server Rewrites),然后选择” yes” 即可(记得刷新Magento缓存).

4.修改.htaccess文件的配置

确保为:

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    RewriteBase /

/etc/in
相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!