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
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.
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/
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.
In System -> Configuration -> Web -> Secure -> Use secure URLs in the frontend, select YES.
Edit the /installdir/apps/magento/htdocs/.htaccess and uncomment the line:
RewriteBase /magento/
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
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]