MPAA - boy baby names - Life Insurance - Mortgages - Mobile Phones

PDA

View Full Version : .htaccess & ModRewrite


danpadams
Mar 24th 2005, 2:53 pm
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.

kyle422
Mar 24th 2005, 5:04 pm
I don't know what you are trying to do with that code, but you might find an answer here
http://www.mod-rewrite.com/forum/

danpadams
Mar 25th 2005, 8:28 am
Thanks for the tip, hopefully I will be able to learn something by reading up on the stuff there.