Hello, I've got a bit of a problem with mod_rewrite.

I am rewriting urls that look like this:
presents-cerruti.php?code=N4359&descripton=some_present

into URL's that look like this:
presents-cerruti/N4359/some_present

with this rules:
RewriteEngine On
RewriteRule presents-cerruti/(.)/(.) /presents-cerruti.php?code=$1&description=$2

The problem is, when I click the link, the images dont't work anymore, because the URL is rewritten and the images can't be found.

How can I avoid this?

    you could do it w/ a rewrite rule, but ive found the easiest and cleanest method is to keep all your images in thier own directory,

    and then add a new htaccess to that directory w/ this

    RewriteEngine Off
    

    you can doo the same for stylesheets again by putting them in thier own directory like above and so on

    then if you have any other oddball files left that you dont want to put in thier own dir,
    do like this in you main htaccess

    RewriteEngine On
    RewriteRule oddball\.php oddball.php [L] # L means last rule, stop rewriting immediately
    RewriteRule ^presents-cerruti/(.*)/(.*) /presents-cerruti.php?code=$1&description=$2 
    
      Write a Reply...