How do I remove index.php from the URL in Magento

前端 未结 5 1381
予麋鹿
予麋鹿 2020-12-06 19:36

How can i remove index.php from the URL in Magento.

For example the home page URL is: www.mydomain.com/index.php

I want to show

相关标签:
5条回答
  • 2020-12-06 20:04

    You can remove the index.php in the frontend URLs performing the following steps in Magento's admin section:

    In System -> Configuration -> Web -> Search Engines Optimizations, select YES.

    Edit the /installdir/.htaccess and uncomment the line:

    RewriteBase /magento/
    

    In my case the subdirectory Magento is in is called magento, so change it to your subdirectory path if it is different.

    0 讨论(0)
  • 2020-12-06 20:08

    You can remove the index.php in the frontend URLs performing the following steps:

    Go to the admin section of Magento.

    In System -> Configuration -> Web -> Search Engines Optimizations, select YES.
    

    Clear cache now see its work. if any case do notwork go to ftp

    find the file in your root .htaccess

    check this line it should be comment for example

    RewriteBase/magento/
    

    Replace with this code.

    #RewriteBase /magento/
    
    0 讨论(0)
  • 2020-12-06 20:18

    You can remove the index.php in the frontend URLs performing the following steps:

    Go to the admin section of Magento.

    1. In System -> Configuration -> Web -> Search Engines Optimizations, select YES.

    2. In System -> Configuration -> Web -> Secure -> Use secure URLs in the frontend, select YES.

    3. Edit the /installdir/apps/magento/htdocs/.htaccess and uncomment the line:

      RewriteBase /magento/

    0 讨论(0)
  • 2020-12-06 20:18

    Login to the Magneto Admin portal. Go to System >> Configuration. Selects the option Web from the General left tab. Use the option Yes for the field Use Web Server Rewrites under the tab Search engines Optimization

    Also check the answer to the post https://stackoverflow.com/questions/12234767/my-magento-pages-wont-work-unless-index-php-is-in-url

    0 讨论(0)
  • 2020-12-06 20:29

    EX: Your Site URL is: http://localhost/my_site/demo1/

    Then add this to (or create) .htaccess (/my_site/demo1/.htaccess)

    RewriteEngine On
    RewriteBase /my_site/demo1/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /my_site/demo1/index.php [L]
    
    0 讨论(0)
提交回复
热议问题