magento url rewrite

Magento 设置 Rewrite Url 方法。
 
1、apache 要加载 Rewrite 扩展模块。
2、网站根目录要有 .htaccess 文件。
3、Magento 后台要设置启用 Rewrite Url 有效。
 
4、(注意:重要)经常有人忘记了这个步骤。
 
 
请参照下面的设置:
 
vi /etc/httpd/config/config.httpd
 
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /var/www/html/magento-3.com
    ServerName www.magento-3.co
    ErrorLog logs/magento-test.com-error_log
    CustomLog logs/magento-test.com-access_log common
    <Directory "/var/www/html/magento-3.com">
        Options Indexes MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
 
请注意上述红色字样。

posted on 2016-04-01 12:26  冯亮  阅读(458)  评论(0编辑  收藏  举报

导航