Password protecting your development site using .htaccess / .htpasswd

You may want to restrict the development site from the search engine or from direct access. One of the popular ways of doing so is to use Apache2 Basic Authentication. Here we will be discussing on how to password protect your development site using Apache2 Basic Authentication which makes use of .htaccess & .htpasswd files. …

Read more

500 Internal Server Error: Mismatch between target GID (XXX) and GID (XXX) of file

Today (at the time of writing) I tried to install Magento 1.7.0.0 via SSH as ‘root’ user using following bash script: #!/bin/bash wget http://www.magentocommerce.com/downloads/assets/1.7.0.0/magento-1.7.0.0.tar.gz wget http://www.magentocommerce.com/downloads/assets/1.2.0/magento-sample-data-1.2.0.tar.gz tar -zxvf magento-1.7.0.0.tar.gz tar -zxvf magento-sample-data-1.2.0.tar.gz mv magento-sample-data-1.2.0/media/* magento/media/ mv magento-sample-data-1.2.0/magento_sample_data_for_1.2.0.sql magento/data.sql mv magento/* magento/.htaccess . chmod -R o+w media mysql -u dbUserName -pdbPass dbName < data.sql chmod o+w …

Read more

Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration

I got the following error for one of the Magento e-commerce website: Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration After googling it was found that the related headers module was not enabled in Apache. I was able to fix the issue simply by following two commands: …

Read more

Setting custom environment variables using .htaccess

If you are familiar with Magento, esp with setting up multiple websites/stores using .htaccess then you may have encountered variables like: MAGE_RUN_CODE & MAGE_RUN_TYPE. Yes they are the custom environment variables. In order to set up custom environment variables using .htaccess, try as follows: RewriteRule ^ – [E=MAGE_RUN_CODE:default] RewriteRule ^ – [E=MAGE_RUN_TYPE:store] Where MAGE_RUN_CODE & …

Read more