MyBB Community Forums

Full Version: need htaccess help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I think he used my solution...
From what I understand, you need a random image generator - where .htaccess comes into play I have no idea.
(2010-09-01, 12:29 AM)Scoutie44 Wrote: [ -> ]From what I understand, you need a random image generator - where .htaccess comes into play I have no idea.

It's just a way to rewrite .php to an image extension. This isn't that important except for maybe forums where dynamic .php images are disabled (and putting an image extension would circumvent that).
Save them in say /images/banners/1.gif etc then in ad.php have

<?php
echo "<img src=\"images/banners/".rand(1,NUMBER OF BANNERS).">";
?>

Actually, that's a cheap solution. I should find something to generate the number of banners in the folder.
Lola my image generator is a little more complex than that but basic principle Wink

Basically I've given people a link to /images/banners/devnet.gif

But I want that image to redirect to /images/banners/ad.php
Pages: 1 2