You don't need RewriteBase in this case as "/promo/images" is located inside your root folder.

This should work for you:

RewriteEngine On
RewriteCond %{REQUEST_URI} !(AS|LB)-def\.gif
RewriteRule AS-.+(jpeg|gif|jpg|png|bmp)$ AS-def.gif [L]
RewriteRule LB-.+(jpeg|gif|jpg|png|bmp)$ LB-def.gif [L]



On 07/06/11 00:18, Admin wrote:
        Many moons ago, we served up a number of colour-CoOrdinated buttons for 
selected people to use on their websites, allowing them to easily link to 
listings on our site without the need to download graphicsd, etc. (This was 
mainly done so that if we underwent a style change, an update of the art on our 
server automatically got reflected on their sites.)

        Now, we are using just one colour scheme... but we are having to waste 
HDD space for legacy sites who don't know how (or just don't want to bother) 
updating the code on their pages...

        Here is what we have TRIED... (this is in an .htacess file located in 
the<root>/promo/images/ subfolder...)
---
RewriteEngine On
RewriteBase /promo/images
RewriteRule ^AS-(.*).(jpeg|gif|jpg|png|bmp)$ /promo/images/AS-def.gif [L]
RewriteRule ^LB-(.*).(jpeg|gif|jpg|png|bmp)$ /promo/images/LB-def.gif [L]
---

        We are attempting to instruct the server... "If they request ANY one of the 
old files (eg. AS-red.gif), in any correct or incorrect format, whether it exists on our 
server or not, replace it with AS-def.gif, similarly if they request one of the old 
coloured LB- style buttons, send LB-def.gif instead regardless."

        We are NOT seeing the new single-style button appearing on their sites, 
just a text placeholder, or worse, nothing at all - depending on default 
browser behaviour.

        PLEASE... what code should we have in there to make this work? And 
sorry for the OT... if anyone knows of a better forum, please let me know and 
I'll happily ask there instead in future.

        Thanks in advance...




---
Karl
www.KIWIreviews.co.nz ... Where Your Views Count
Please consider the environment before printing this email

For regular updates and advance notice of special events and review goods, why 
not join us on

Facebook : http://www.KIWIreviews.co.nz/facebook
or
Twitter : http://www.KIWIreviews.co.nz/twitter

KIWIreviews accepts no responsibility for changes to this email, or for any 
attachments, after its transmission from the KIWIreviews server. Thank you.

- - - - - - - - - -
We use CourierPost for all of our freight delivery requirements.
- - - - - - - - - -


--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to