.htaccess & ModRewrite

Discussion in 'Apache' started by danpadams, Mar 24, 2005.

  1. #1
    I have tried the following in the .htaccess file for the root of my site:

    RewriteCond %{HTTP_HOST} ^domain.com$
    RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

    When I do this, it works great and does what I want with one exception. I have several <img> tags in my website and when the src attribute uses a single quote instead of a double quote it seems to not want to let the rewrite of the pictures address work. Does anyone have a suggestion of what to do. I know all of the pictures that I want to just have it ignore are in the images directory, plus some other directories under that.
     
    danpadams, Mar 24, 2005 IP
  2. kyle422

    kyle422 Peon

    Messages:
    290
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    kyle422, Mar 24, 2005 IP
  3. danpadams

    danpadams Peon

    Messages:
    101
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the tip, hopefully I will be able to learn something by reading up on the stuff there.
     
    danpadams, Mar 25, 2005 IP