Actually my concern was to redirect the both internal and external IP addresses to the domain name and any http://domain traffic to https://domain, which I have achieved by adding these lines in httpd.conf file:
#Redirect IP to domain name
<IfModule rewrite_module>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^172\.1\.20\.4$ [NC,OR]
RewriteCond %{HTTP_HOST} ^83\.101\.140\.185$ [NC]
RewriteRule (.*) http://ict-helpdesk.madanonwovens.com/$1 [R=301,L]
</IfModule>
#Redirect all connections to HTTPS
<IfModule rewrite_module>
RewriteEngine On
#Force SSL on all connections
RewriteCond %{HTTPS} off
RewriteCond %{REMOTE_HOST} !^127\.0\.0\.1
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
But now I want to redirect https://IP-address to https://domain Because when I write https://IP-address it ask me to add exception and redirect to the page without encryption.
Please Help!