Rewrite breaking all my images :(
Posted on 2006-05-30
# htaccess rewrite modules for ccp
# don't write category.php
RewriteRule ^category\.php - [L]
Rewriterule ^cat/(.+) category.php?$1 [L]
I found "RewriteRule ^.+/images/?(.*)$ /images/$1 [R=301,L]" -- but the thing is, that only allows images to be in root level/images :( and I have an administration interface /ccp/ that also has images and css folders etc that will also need to utilize that. So in putting that rule in, it basically takes away the ccp's images folder so that isn't acceptable. Sadly, though, I can't figure out what I can do but I need to assume there are going to other images folders within sub folders and they will need to work :( Anyways onto the other part below.
Basically with this rewrite, as you can see, I'm trying to rewrite a url like this /cat/soda/coke/cola/can or /cat/soda/coke/cola/bottle or infinite other categories / sub categories.
Basically all of my images on category.php (the page I rewrite to) are broken :( And I can't figure out how to write my rewrite rule to where it actually shows the images even if the browser is pointed /cat/whatever/im/at/... etc...
Any help is much appreciated!