Adding rewrite for non-www to www

The easiest way to add an Nginx rewrite to redirect your traffic from non-www to www is to add the following Nginx code snippet to your domain's ___general/ file. set $redirect "0"; if ($host ~* "^(.+)\.example\.com$") { set $cursubdomain $1; … Continue reading

Finding all Magento secure URIs

We recently needed to try and identify all HTTPS URI's in a customer's store and had to quickly write a script to scan the core, local and community directories to find any pages that used HTTPS. This is by no … Continue reading

Identifying admin/frontend namespace/router paths

Table of ContentsAdmin namespaces/routers Frontend namespaces/routersAs MageStack needs to know how to differentiate admin areas from frontend areas - it relies on a fixed value supplied to the configuration. By default, the normal Magento /admin namespace is included, but if … Continue reading

Debugging with Nginx access logs

The Nginx access logs have been customised to include additional MageStack information for debugging. A typical access log entry will look like this, "[23/Aug/2019:15:38:23 +0100]" "" "" "" "US" "199542" "" "Mozilla/5.0" "Dynamic" "Frontend" "-" "-" "-" "200" "954" "0.000" … Continue reading

Restoring a database backup

Table of ContentsCompression format Running the restore Magento 1There is a number of ways to import a database backup, but we've found the quickest method is to decompress the two files and import using Compression format The backups are … Continue reading