Appending www to url
RewriteCond %{HTTP_HOST} ^example.net$ [NC]
RewriteRule ^(.*)$
the above code works for
I simply want www appended automatically. Please help.
7 Replies
RewriteCond %{HTTP_HOST} !^
RewriteRule ^(.*)$
It turned out to be more of a redirection problem than rewrite rules so here is the solution.
In linode dns
example.com
In Virtual host
servername
serveralias example.com
In the website directory .htaccess file is supposed to contain;
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$
If so then you don't need a redirect rule just make sure your DNS is setup right.
yes the idea is to have a website which is accessible by
&
example.net (currently the link gives page cannot be displayed)
to reach
Can't make it more clearer than this