How to remove index.php when we enter manually in the URL
My store path is /var/www/html/testfolder/
Thanks
How to remove index.php when we enter manually in the URL
My store path is /var/www/html/testfolder/
Thanks
Add this in your .htaccess after RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ https://domain.com/$1 [R=301,L]
Change domain.com to your domain and check do you use http or https. Its worked for me. When I enter address with index.php its redirecting to domain.
First, you have to make sure that Apache rewrites module is enabled on your server and then follow the below steps...
Login to Magento admin account and go to this path - System > Configuration > General > Web.
Select the yes for Use Web Server Rewrites in Search Engine Optimization (on Web settings).
Now, Go to Magento root directory and add following code in .htaccess.
<IfModule mod_rewrite.c>
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
</IfModule>
It require enable mod_rewrite module
Use web server rewrite "Yes" from admin setting
Check refrence from here : How to remove index.php from your Magento site URL
Try this :
remove index.php
change in below path
Override file in local and _updatePathUseRewrites
comment line 599 and 606
app\code\local\Mage\Core\Model\Store.php
You can manage it through .htaccess file of your magento root directory. Add the following code to your .htaccess it should work.
RewriteEngine On
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.your-domain-name.com/$1 [R=301,L]