Link to home
Start Free TrialLog in
Avatar of stuayre
stuayre

asked on

mod_rewrite image names

Hi,

is there a way to use mod_rewrite to change the name of my images.

for example i have <img src="/my_image_folder/imagename.gif">

but i would like <img src="/my_image_folder/anything_i_like_here_(img)_imagename.gif">

but it would still bring up the same image as above. (I put (img) in a seperator)

is there a way?

cheers

Stu
Avatar of ravenpl
ravenpl
Flag of Poland image

Of course
Put .htaccess file into my_image_folder/ (! ! !)

RewriteEngine On
RewriteCond %{REQUEST_URI} !anything_you_like
RewriteRule (.+) anything_you_like_$1 [L]

It will rewrite any image access to anything You like, except the image have alread anytning You like in its name
ASKER CERTIFIED SOLUTION
Avatar of stuayre
stuayre

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stuayre
stuayre

ASKER

no answer