How to redirect on htttp to https with www redirect of coldfusion mx7?
Hi any one help me - How to redirect on htttp to https with www redirect of coldfusion mx7?
Hi any one help me - How to redirect on htttp to https with www redirect of coldfusion mx7?
You should run the following code, and convince yourself that the URLs are accessible, by opening each in a browser:
<cfoutput>
https://www.site.com#CGI.SCRIPT_NAME# <br>
https://#CGI.SERVER_NAME##CGI.SCRIPT_NAME# <br>
http://www.site.com#CGI.SCRIPT_NAME#
</cfoutput>
I used below code. its working perfectly. thanks a lot.
<cfif (CGI.SERVER_NAME EQ "site.com") and (CGI.https NEQ "on")>
<cfheader statuscode="301" statustext="Moved permanently">
<cfheader name="Location" value="https://www.site.com#CGI.SCRIPT_NAME#">
</cfif>
<cfif (CGI.SERVER_NAME EQ "www.site.com") and (CGI.https NEQ "on")>
<cfheader statuscode="301" statustext="Moved permanently">
<cfheader name="Location" value="https://www.site.com#CGI.SCRIPT_NAME#">
</cfif>
<cfif CGI.SERVER_NAME EQ "site.com">
<cfheader statuscode="301" statustext="Moved permanently">
<cfheader name="Location" value="http://www.site.com#CGI.SCRIPT_NAME#">
</cfif>
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.