Click here to Skip to main content
15,889,804 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Now i have installed ssl and when i open in http://abc.com and https://abc.com both opens perfectly but now i need to force open https even when people type http only..

i have tired httpd.conf file with below codes but still no result

RewriteEngine On
# This will enable the Rewrite capabilities

RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS

RewriteRule ^/?foldertosecure/(.*) https://%{abc.com}/foldertosecure/$1 [R,L]
# This rule will redirect all users who are using any part of /secure/ to the same location but using HTTPS.
# i.e. http://www.abc/foldertosecure/ to https://www.abc.com/foldertosecure/
# This means if you dont want to force HTTPS for all directories you can force it for a specific sub-section of the site.



i am working on java springs website where we need to make it secured i mean from http to https and i have installed SSL. when i try opening https://abc.in then it works fine but when i try opening https://abc.in/abcadmin then it will show code behind also i tested in some website for correct installation then it showed it has installed correct.

tried so far: installed and reinstalled SSL and changed httpd.conf files and did trial and error restarting tomcat server
Posted
Updated 23-Oct-13 4:10am
v2
Comments
thatraja 25-Oct-13 9:16am    
Include complete error details in your question always

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900