HTML and CSS Reference
In-Depth Information
example.com"
# <IfModule mod_rewrite.c>
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP_HOST} ^www\.(.+)$
[NC]
# RewriteRule ^
http://%1%{REQUEST_URI} [R=301,L]
#</IfModule>
As you might notice, all we did was add a # character and a space before
each of those lines.
3. Now, we shall enable the second option by uncommenting it. Change the
following code snippet by uncommenting it:
# Option 2:
# To rewrite "example.com ->
www.example.com" uncomment the
following lines.
# Be aware that the following rule
might not be a good idea if you
# use "real" subdomains for certain
parts of your website.
# <IfModule mod_rewrite.c>
# RewriteCond %{HTTPS} !=on
# RewriteCond %{HTTP_HOST} !^www\..+$
[NC]
# RewriteRule ^
http://www.%{HTTP_HOST}%{REQUEST_URI}
[R=301,L]
# </IfModule>
4. The uncommented code section should look like the following code snip-
pet:
Search WWH ::




Custom Search