I am using Magento 2.1.
I am trying to add a rewrite rule in .htaccess
file for url's starting with index.php?route=
. to be replaced with the query string.
RewriteCond %{QUERY_STRING} ^index.php?route=.+$ [NC]
RewriteRule ^(.*)$ /%{QUERY_STRING}\? [R=301,L]
But this url rewrite rule is not getting reflected in my site.
Am I editing the right file(root/.htaccess)
.?
Please suggest a solution to my problem.
Best Answer
Check if mod_rewrite is enabled on your server. That can be done by reading the phpinfo(); from a script on your server.
Use the below code in .htaccss
Other way is
Remove cache and check.