From: Guenter M. <mi...@us...> - 2017-01-23 21:05:22
|
On 2017-01-23, Chris Green wrote: > On Mon, Jan 23, 2017 at 04:02:59PM +0000, Roberto Alsina wrote: >> If you are going to use relative URLs, they need to be relative to >> where the HTML page resides, not to where the rst text is. >> So, if your page ends at [1]http://foo.bar/boo/this.html with a >> relative URL to the image of "DSCF6584.JPG" then the image better be >> available at [2]http://foo/bar/boo/DSCF6584.JPG or it will not work. > Unfortunately my HTML doesn't reside anywhere, it's generated by > rst2html and eaten by a PHP script. That's what I meant by it being > generated 'dynamically'. For the viewing browser, it should make no difference whether it is static or dynamic: if you can view the generated HTML document under http://example.org/this/is/a/dynamic/path/mydoc.html or http://example.org/this/is/a/dynamic/path/mydoc.php, a relative URL should be relative to http://example.org/this/is/a/dynamic/path/ but: > I think basically there's no practical way to use relative URIs in my > situation, they'll have to be absolute. Indeed, absolute URIs seem to be the most practical solution for your problem. Günter |