|
Posted by Erwin Moller on 01/30/08 16:47
Peter wrote:
> (Apologies if this is sent twice, server issues it seems)
>
> Hi,
>
> I use something like this:
>
> RewriteRule ^(.*).png$ ../../templates/png_help/$1.png
>
> The links to png in my pages exist to this subdir, but in fact the png are
> located somewhere else in a templates directory.
> Now, I'm shuffeling folder layout, in part to support localisation etc.
> therefore the location might differ based on variables.
>
> Can I use external variables somehow in .htaccess ?
> E.g. {TARGET_DIRECTORY}/templates/png_help/$1.png
Hi Peter,
If I were you I would repost this in alt.apache.configuration
>
> Or call a function that outputs the directory ?
> e.g. <?php echo DIR ?>/templates/png_help/$1.png
That will surely not work.
You have no PHP variables available in your apache configuration.
>
> or .... ???
>
Maybe you can solve this with a rewriterule, but I don't know how.
Alternatively you can simply call a PHPscript that returns the png.
From HTML, instead of:
<img src="templates/png_help/example.png">
you write:
<img src="mypngscript.php?png=example.png">
And let mypngscript.php handle all complex path stuff.
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|