Previously my host provider gave an option of setting up rewrite rules in apache configuration files. At that time below rule worked fine.
# Non WWW URLs to WWW URLs
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]
Right now I am moving all these rules to .htaccess
and in every redirect, it adds the document root like /var/www/sites...
in URL.
Why is this behaving differently ?