How to remove index.php from URLs?

后端 未结 8 1019
我寻月下人不归
我寻月下人不归 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:44

    Mainly If you are using Linux Based system Like 'Ubuntu' and this is only suggested for localhost user not for the server.

    Follow all the steps mentioned in the previous answers. +

    Check in Apache configuration for it. (AllowOverride All) If AllowOverride value is none then change it to All and restart apache again.

    
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    
    

    Let me know if this step help anyone. As it can save you time if you find it earlier.

    I am adding the exact lines from my htaccess file in localhost. for your reference

    Around line number 110

    
    
    ############################################
    ## enable rewrites
    
    Options +FollowSymLinks
    RewriteEngine on
    
    ############################################
    ## you can put here your magento root folder
    ## path relative to web root
    
    #RewriteBase /
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    

    Images are for some user who understand easily from image the from the text:

提交回复
热议问题