file htaccess tricks

RewriteEngine On
RewriteCond %{HTTP_HOST} ^instadiet.in [NC]
RewriteRule ^(.*)$ http://www.instadiet.in/$1 [L,R=301]

#RewriteEngine On
#RewriteCond %{HTTPS} ^on$
#RewriteRule ^(.*)$ http://www.instadiet.in/$1 [NC,L,R]


RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]



#RewriteEngine On
#RewriteCond %{SERVER_PORT} ^443$ [OR]
#RewriteCond %{HTTPS} =on
#RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#RewriteEngine On
#RewriteCond %{HTTPS} =on
#RewriteRule ^/(.*):NOSSL$ http://www.instadiet.in/$1 [R=301,L]

#RewriteCond %{HTTP:X-Forwarded-Proto} =https
#RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Leave a Reply