Question

I wanted to write redirect rules to remove index.php from incoming urls in htaccess.conf file(in my app folder) and replace it with the query params.

I ensured my rewrite rule to be working perfectly in locahost,when it comes to bitnami,no changes. Even simple rewrite rules are not getting done here. And No records in error.log.

Steps:

1) I ensured in apache2\conf\httpd.conf mod_rewrite module is enabled.

2) I changed in opt\bitnami\apps\magento\conf\httpd-app.conf for my particular Directory AllowOverride all.

3) In bitnami\apps\magento\conf\htaccess.conf

I have added my rewrite rule

Options +FollowSymLinks

RewriteEngine on

RewriteCond %{QUERY_STRING} ^index.php?route=.+$ [NC]

RewriteRule ^(.*)$ /%{QUERY_STRING}\? [R=301,L]

Do suggest and Help me with this issue if I am doing something wrong..I have been spending more than 2 days to solve this issue..

Was it helpful?

Solution

Bitnami developer here. If you modified your httpd-app.conf file to use "AllowOverride all", it is possible you have other ".htaccess" file into the "/opt/bitnami/apps/magento/htdocs" folder that is overwriting that rewrite rule. If you set to "None" should fixes that issue.

Magento also requires to be configured with the hostnami or IP address of your site. It does not depend on the rewrite rule. Check you already configured the application properly with your domain/IP. https://docs.bitnami.com/installer/apps/magento/#updating-the-ip-address-or-hostname

I hope it helps

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top