Below snippet shows how to redirect a site from non-www to www
RewriteCond %{HTTP_HOST} ^onlinenote.in$ [NC]
RewriteRule (.*) http://www.onlinenote.in/$1 [R=301,L] or
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] or
Here’s the correct solution which supports https and http:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTPS}s on(s)|offs()
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [NE,L,R]
To remove the .html extension from your urls, you can use the following code in…
Below snippet shows how to redirect a site from non-www to www (or viceversa) and…
If you get 404 page not found error after installation. In this case your server…
Below shows common redirects using htaccess file. [crayon-68be03221010b945476148/] The CI .htaccess shouldn't be in the…