subdomain changes image path

前端 未结 1 1901
执笔经年
执笔经年 2021-01-24 00:20

I have one dynamic website with back end control panel which contains ckEditor for data entry.

ckEditor inserts images with path like: /userfiles/image1.jpg

相关标签:
1条回答
  • 2021-01-24 01:01

    You can define a <base> in your <head>:

    http://www.w3schools.com/tags/tag_base.asp

    To do ist with PHP is hard. Changing it beforehand to an absolute URL might be the best way, changing it afterwards means HTML scanning, finding the images, check wether the url is absolute or relative and change it, if needed.

    0 讨论(0)
提交回复
热议问题