Created
May 1, 2017 23:58
-
-
Save SimonLlewellyn/735f2ce0fbb093569b91ccdde9cbdb15 to your computer and use it in GitHub Desktop.
Redirect www from Application.cfc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//in Application.cfc | |
<cfset currentPath = "#cgi.request_url#"> | |
<cfif find("www.",currentPath)> | |
<cfheader statuscode="301" statustext="Moved permanently"> | |
<cfheader name="Location" value="http://domain.com"> | |
<cfabort> | |
</cfif> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment