RSS Feed

Archive for the ‘Apache’ Category

301 redirect Old domain to a New domain Using HTAccess

January 6, 2011 by admin No Comments »

Add the following code some where in your htaccess file: They are both similar but different approach depending on your likes!

Options +FollowSymLinks
RewriteEngine On
redirectMatch 301 ^(.*)  http://www.domain.co.uk/$1

OR

Options +FollowSymLinks
RewriteEngine On
RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]

NB:
Please REPLACE www.domain.co.uk in the above code with your actual domain name.

 

Set Magento Developer Mode On htaccess or Apache files

November 22, 2010 by admin 3 Comments »

Its easy to set the developer mode on all the time on your development environment while working in Magento by editing the .htaccess or apache config file.

Apache config file is better because the settings will be inherited by all the projects you work on on this machine and will spare you from having to remember to re-set the settings before going live.

Here is the command you need to add to the apache (httpd.conf) file:

Open the file as admin:

Locate the lines lookin like these

Options FollowSymLinks
….

Add the followin line just after the
SetEnv MAGE_IS_DEVELOPER_MODE “”

So you have something like

SetEnv MAGE_IS_DEVELOPER_MODE “”

Save and restart apache!