IIS provides method of redirecting from http to https in case you want shifting from http to https automatically (secured socket layer). To implement it, one of the methods named: URLRewrite Module can be used. The following steps are to be followed:
1. Download the rewrite module for IIS 7. The link for downloading is:
http://www.iis.net/download/URLRewrite
2. Now install the rewrite module and restart the server.
3. Copy the following code in the root directory (web.config file under system.Webserver)
Please note that if we want to automatically do for all the virtual directories like: http://mywebsite/india then, we have to do the following changes:
url="https://{HTTP_HOST}/{RESOURCE_URI}"
1. Download the rewrite module for IIS 7. The link for downloading is:
http://www.iis.net/download/URLRewrite
2. Now install the rewrite module and restart the server.
3. Copy the following code in the root directory (web.config file under system.Webserver)
Please note that if we want to automatically do for all the virtual directories like: http://mywebsite/india then, we have to do the following changes:
url="https://{HTTP_HOST}/{RESOURCE_URI}"
Comments
SQL INJECTIONS and CROSS-SITE SCRIPTING...... WE CAN USE......REGULAR EXPRESSION VALIDATOR...So that these malicious activities can be blocked at Client Side only......
ValidationExpression="[^\*\-\=\;\'\(\)\$\"\<\>]*
or
in property window -> set validation expression = [^\*\-\=\;\'\(\)\$\"\<\>]*
... THIS expression does not allow the sql injection and cross-site scripting in your textBOXES keywords ...!!!
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}