Onex ecstore开启伪静态(apache)

首先加载Rewrite模块:

在conf目录下httpd.conf中找到

LoadModule rewrite_module modules/mod_rewrite.so

去掉前边的#号

在apache配置文件里边把AllowOverride 改成“All”(默认为“None”)

然后在服务器上面新建文件 vim .htacess 或者本地写好文件后通过ftp上传,目录为ecstore根目录

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule . - [NC,L]
RewriteRule . index.php [NC,L]

修改ecstore项目下目录config/config.php

vim ecstore/config/config.php
//修改文件,改为:
defind('WITH_REWRITE',true)
//伪静态即可开启