>  기사  >  백엔드 개발  >  Magento去除URL中的index.php

Magento去除URL中的index.php

WBOY
WBOY원래의
2016-06-13 10:38:24963검색

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
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.