They “Clean up” the URL structure used when visiting a Magento webshop.
Rather then having URL’s like:
https://your.shop/index.php/some/product, after enabling the
Search Engines Optimization setting, the URL will instead be rewritten to:
This setting does not require additional webserver configuration. To make use of clean URL’s in Magento, all you need to do is adjust the
Search Engines Optimization setting in the Magento backend. If you enable this setting, the URL’s containing index.php will be rewritten to URL’s without the index.php.
Enable clean urls
To enable the use of clean URL’s, log in on your Magento admin backend and navigate to:
For Magento 1:
Search Engines Optimization .
For Magento 2:
From there, enable
Use Web Server Rewrites (Select “Yes”), and click
Save Config to activate your changes.
As redirects are heavily cached in your local browser cache, sometimes it’s necessary to flush the cache of your browser.
Remove index.php from any URL
To remove the index.php from the URL, use the following snippet and add it to
rewrite ^/index.php/(.*) /$1 permanent;