Announcement

Collapse
No announcement yet.

URL always need "index.php", why?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • URL always need "index.php", why?

    My local installation of Magento always need "index.php".
    Ex : http://localhost/magento/index.php/my_custom_module/my_action/

    http://localhost/magento/ can load fine, but i cannot use

    http://localhost/magento/my_custom_module/my_action/

    Is there anything i miss? settings perhaps?
    Is it have anything to do with url rewrite?

    Using magento CE 1.9.2.1
    Any suggestion please?
    Thanks

  • #2
    You try to put files .htacess

    RewriteEngine on
    RewriteBase /websiteLocation
    RewriteCond $1 !^(index\.php|resources|robots\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L,QSA]

    Good luck

    Comment


    • #3
      Login admin panel -> go to system -> Configuration -> Web Use Web Server Rewrites select YES.
      Make sure your Secure and Unsecure base urls should end with
      Then go to htaccess file remove the index.php from here

      Comment


      • #4
        Nice thanks for share impressive information.
        Vashikaran specialist in Delhi

        Comment


        • #5
          ‘Index.php’ can be successfully removed from the web-site URL only in case mod_rewritemodule is enabled on your server. To check this, you may contact your server administrator/hosting provider.

          to remove ‘index.php’ from the website URL follow these steps:

          1 Click the System->Configurationtab.
          2 On the appeared screen click "Web"tab under "General" on the left hand side of your admin panel. You will see the below screen
          3 Now set the "Use Web Server Rewrites" option under "Search Engines Optiomization" to "Yes"
          4) Then, set the "Use Secure URLs in Frontend" option under "Secure" to "Yes". Click "Save Config" button in the top right
          5) Now we need to create an .htaccessfile with the rewrite directives in the root of your Magento installation. You may use yourhosting control panelFile ManagerorFTPto create a file.
          Put the following code in the created file:

          <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> In case your Magento is installed in sub-folder, e.g. ‘shop’, you should use the following code:

          <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /shop/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /shop/index.php [L] </IfModule> 6. Save the file and check your website.
          The ‘index.php’ is successfully removed from the URL.

          Regards,

          Knowband Plugins | Best Magento extensions
          Last edited by knowband.plugins; 23-08-16, 12:27 PM.

          Comment


          • #6
            thanks i was also looking for same solution.

            Comment

            Working...
            X