non-www to www with .htaccess

I don’t know how many times I have been searching for this piece of code hahaha….
There is few ways to make this kind of redirection with .htaccess, but i think this way is universal and requires no other setup and it works without changing anything.


RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

Advertisements

Installing Symfony without pear installation (via SmRonju)

Installing Symfony without pear installation Installing symfony 1.4.6 without pear is not that difficult. In my earlier post I show you how to install symfony 1.4.6 with pear installation. That may not be helpful for those who don’t have Internet. So I insist to show you how to install symfony 1.4.6 without pear. Let’s start. Step-01. First make directory under /var/www/ folder. Suppose a folder name ‘smronju’. You can do it in command line like sudo mkdir -p /var/www/smronju Step-02. As a … Read More

via SmRonju