Venkat
Venkat

Reputation: 307

Coldfusion framework application configuration

We have one legacy ColdFusion framework application and we have recently changed the domain name of the application. The issue is some of the menu items are redirecting to the old domain URL.

Here I'm trying to see if anyone can help me to find out where the configuration files reside. How can I find the application property files and change the new domain URL to the new address?

I have tried to run the search operation on the wwwroot folder and found some 400+ static entries are encoded in the .cfm files.

Thank you, Regards, Venkat

Upvotes: 0

Views: 69

Answers (2)

Venkat
Venkat

Reputation: 307

Have found the a table which have link to the menu folder, updating the table with new links fixed the issue.

Upvotes: 0

Adrian J. Moreno
Adrian J. Moreno

Reputation: 14859

You may have a few options:

Find and Replace

Just use your editor to find and replace www.oldSite.com withe www.newSite.com.

Relative Paths

If the links are directing to https://www.oldSite.com/some/url.cfm, you should be able to change them to /some/url.cfm so they all act off the root of the site. You also have the option to globally set a <base href="https://www.newSite.com"> in a (cross fingers) global layout file, so that you all links are relative to the new domain.

Set Global Variables

In your Application.cfc or Application.cfc at the root of the application, you can set a global variable: <cfset application.domain = "https://www.newSite.com"> and then you'll still have to find and replace the old domain string and replace it with a reference to the new variable:

from <a href="https://www.oldSite.com/some/url.cfm">

to <a href="#application.domain#/some/url.cfm">, but you'll also need to make sure this is wrapped with <cfoutput> tags to render the value of the variable.

Don't Forget Emails

You should also check for hard-coded email addresses throughout the code base. They'll be referencing the old domain as well. You can create new global variables for them as well.

Upvotes: 3

Related Questions