How to remove index.php from URLs?

后端 未结 8 1024
我寻月下人不归
我寻月下人不归 2020-11-27 12:02

All of my URLs on my Magento installation require index.php in them, like:

http://example.com/index.php/admin/
http://example.com/index.php/customer/account/         


        
8条回答
  •  甜味超标
    2020-11-27 12:57

    You have to enable mod_rewrite in apache to make clean urls to work

    if mod_rewrite is not in phpinfo you have to install it by

    sudo a2enmod rewrite
    sudo apache2ctl -l
    

    You need to replace the occurrence of AllowOverride none to AllowOverride all ( in /etc/apache2/sites-enabled/000-default)

    Restart Apache

    sudo service apache2 restart
    

    In Magento’s admin go to System > Configuration > Web > search engine Optimization and change “Use Web Server Rewrites” to Yes

提交回复
热议问题