1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

image rewrites with .htaccess - is it even possible?

Discussion in 'PHP & Perl' started by slayer2103, Jun 3, 2009.

  1. slayer2103

    slayer2103 Newbie

    Joined:
    Feb 2, 2008
    Messages:
    1
    Likes Received:
    0
    We all know that it is possible to rewrite dynamic html files to php files,
    but is it possible to create dynamic jpg files?

    i.e. rewrite a fictive 22.jpg to 1.jpg?
     
  2. mortenb

    mortenb Newbie

    Joined:
    May 21, 2009
    Messages:
    9
    Likes Received:
    0
    yes
    You could also rewrite 22.jpg to 22.php and have your php script output a dynamic image if you wanted.

    On a lot of my sites i've had picture query strings similar to this /93-new-audi-a5-3.0-tdi.jpg which would be rewritten to /images/93.jpg
    That way I get keywords in the image url for Google Image Search lovin'