consider following url:
http://sitename.com/School/Admin/PageViewer
i have a subfolder in School named UserFiles that contains images that users uploaded.
in PageViewer, i used TinyMCE to add HTML Contents. when i insert an image from UserFiles folder, in src attribute of img tag it takes this address: ../UserFiles/imageName.jpg
the real problem is when i request for the url: http://sitename.com/School
this url has an optional parameter called PageId which can have null values. if no value supplied for this parameter, it will open a default page that made by PageViewer.
my problem is images get broken when i request the above url. but if i send the request like h–p://sitename.com/School/Page/1 the images display correctly.
the url of broken images is like: h–p://sitename.com/UserFiles/imageName.jpg
but it should be: h–p://sitename.com/School/UserFiles/imageName.jpg
how can i solve this problem?
thanks in advance.
The easier way is to tell TinyMCE to render full URL instead of relative URL. That way no matter where you show your content, images are not broken.
Put this in your configuration :
It should be in the javascript which initializes the TinyMCE editor.