I have a little problem and I don't know why is that.
I tried :
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
and
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
But no succes.
It redirect the website from : http://domain.com to http://www.domain.com
but not from http://domain.com/sample-page to http://www.domain.com/sample-page
Why?!
Update : I use HHVM 3.6.6 . This can be the reason?! And place for .htaccess is in httpd-app.conf (Bitnami HHVM)