For more information... RTFM!
NAVIGATION
RECENTLY VIEWED
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

ImageDir

Request that Interchange rewrites any old image directories with a new value.

Synopsis

ImageDir  location

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).

Note

Note

This directive operates before the ImageAlias, and will be ignored if the no_image_rewrite pragma is set true.

Warning

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

ImageDir  /images/

The above will have the following rewrite effect on your HTML: 

Found in HHTML input

<img src="foo.gif">
<img src="/foo.gif">
Rewritten HTML output

<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): 

Found in HTML source

<img src="foo.gif">
<img src="/foo.gif">
Rewritten HTML output

<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): 

Found in HTML input

<img src="foo.gif">
<img src="/foo.gif">
Rewritten HTML source

<img src="https://www.example.com/images/foo.gif">
<img src="/foo.gif">

See also

Category:  Local config directives
Last modified by: Kevin Walsh
Modification date: Monday 28 August 2006 at 2:25 PM (EDT)
Home  |  Legal nonsense  |  Privacy policy  |  Contact us