i recently installed An SSL certificate from Comodo on my website. after that i have been facing issues on my android app. the app fails to communicate with the web server. giving an error
javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
i have contacted my hosting service to look into the SSL chain and they say there is no issue on their end.
i am using this code to redirect all traffic from http to https on my website in the .htaccess file
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
when i removed this code, everything works fine. how can i redirect the website traffic to https without creating issue in the app