I've the next two mod_rewrite redirects. Both of them seem to perform the same factor, but I am unsure why the first is two lines more than another. (I have used the more one btw):


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


RewriteEngine On
RewriteRule ^$ /shows [L]

The additional two lines simply forward demands for just about any page at example.com towards the same page at www.example.com, carrying out a 301 permanent redirect (hence the R=301...).

It is good practice not have duplicate content on two domain names (for Search engine optimization reasons) so many people nowadays forward example.com to www.example.com the other way round can also be perfectly valid and quite broadly used (ie. redirecting www.example.com to example.com).