TargetProcess 中更改了域名如何修改里面的附件地址

在默认情况,TP 安装的目录是默认的网站(IIS)的targetprocess2下面,但是如果想采用 tp.targetprocess.cn 这种方式直接访问,则需要做一些设置。

基本要点如下:

1. 新建一个网站 同样绑定80端口,采用不同域名

http:*:80:tp.targetprocess.cn

2. 注意在目录指向目录targetprocess2/wwwroot - 采用应用池 targetprocess application pool

3. 将其下的javascript 转为Application,同时采用应用池 targetprocess static pool

4. 启动即可

5. 将原有默认网站下targetprocess2应用删除

6. 在setting里面把网站地址改过来。

 

由于有些TP已经使用有一段时间,所以附件指向地址不是新的地址,这样会出现图片无法访问等情况。

 

一种文字是放在comment里面的,所以需要手动使用sql 更新

  update TargetProcess.dbo.Comment
  set Description = REPLACE(description, '120.25.xxx.xxx/TargetProcess2','tp.targetprocess.cn') where  Description like '%120.25.xxx.xxx/TargetProcess2%'

一种是在story等里面(数据表等同 general )

  update TargetProcess.dbo.[General]
  set Description = REPLACE(description, '120.25.xxx.xxx/TargetProcess2','tp.targetprocess.cn') where  Description like '%120.25.xxx.xxx/TargetProcess2%'

 

这样就可以了。

posted on 2016-07-24 11:22  一望无际的南  阅读(422)  评论(0编辑  收藏  举报

导航