tool like this?

Discussion in 'Products & Tools' started by digital2006, Apr 25, 2007.

  1. #1
    I created my first site back in 1999. I've re-done the site.

    Back then, for all of the images on the site, I put them all in the same directory as the html files. So I have 1 big directory of html files and images, which is kind of a mess.

    Is there a program out there that will go through all of my files, and rename every image reference I.E. replace "<img src="whatever.gif"> with <img src="images2/whatever.gif"> ? I also have jpg images.

    Thanks.
     
    digital2006, Apr 25, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    You don't need to change your html files.
    Simply instruct your server to find/get your image files on another directory.
    If your server is apache, you can do that with a thing called "mod rewrite" adding a simple line on your .htaccess file.

    Example:
    RewriteEngine on
    RewriteRule ^([^\.]+)\.gif /images2/$1.gif
    RewriteRule ^([^\.]+)\.jpg /images2/$1.jpg
     
    ajsa52, Apr 25, 2007 IP