Tuesday 29 May 2018

How to force redirect HTTP to HTTPS in AWS or any other server using .htaccess

1st Method
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

2nd Method
<IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteCond %{HTTPS} !on
     RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

Thursday 3 May 2018

How to get the final sql / mysql query from the grid includes filters and pagination in Magento


Open Following file
Open MagentoRoot/lib/Varien/Db/Adapter/Pdo/Mysql.php
Update false to true
protected $_debug = true
protected $_logAllQueries  = true