ImageDir
Request that Interchange rewrites any old image directories with a new value.
Synopsis
Scope
This directive is only available for use in the local
(catalog.cfg) configuration file.
It will not affect any other website in any way.
This directive will not work in the global
(interchange.cfg) configuration file.
Description
This directive specifies a location for images, where no image
location has been specified in the HTML source.
As well as <img src="...">, the image location will also
be inserted into the "<body>" tag's "background",
and any "background" parameter specified in a
"<table>" tag or sub-tag ("<tr>",
"<th>" and "<td>").
We generally recommend that you simply code the correct images
location directly into your HTML source, but this directive still has
its uses.
For instance, you might want to use a different images
location depending upon whether the page is secure (HTTPS/SSL) or
insecure (HTTP).
|
Warning
The location must have a trailing slash ("/")
if unexpected substitutions are to be avoided.
No substitution will be performed if the image is
specified in the HTML source with a leading slash (i.e. "/foo.gif").
|
Example
Setting an image location
The above will have the following rewrite effect on your HTML:
<img src="foo.gif">
<img src="/foo.gif">
|
<img src="/images/foo.gif">
<img src="/foo.gif">
|
Setting different secure/insecure locations
ImageDir /images/
ImageDirSecure https://www.example.com/images/
|
The above will have the following rewrite effect on your HTML
when the page is insecure (HTTP):
<img src="foo.gif">
<img src="/foo.gif">
|
<img src="/images/foo.gif">
<img src="/foo.gif">
|
The above will have the following rewrite effect on your HTML
when the page is secure (HTTPS/SSL):
<img src="foo.gif">
<img src="/foo.gif">
|
<img src="https://www.example.com/images/foo.gif">
<img src="/foo.gif">
|
See also