[thelist] Image not displaying using mod rewrite
Dave Stevens
evolt at davestevens.co.uk
Mon Nov 6 05:26:18 CST 2006
rahaman wrote:
> hi ,
> I have the problem of displaying images using mod rewrite . i want to
> display the following link
>[...]
> RewriteRule ^index/([^/\.]+)?$ index.php?handle=$1 [L]
> RewriteRule ^index/([^/\.]+)/([^/\.]+)$ index.php?cat=$1&subcat=$2 [L]
> RewriteRule ^index/([^/\.]+)/([^/\.]+)/([^/\.]+)$
> index.php?cat=$1&subcat=$2&pg=$3
> [L]
These three rules are causing your problem. Basically, this rewrites
anything below the "index" folder and sends it as a variable to
index.php, which means that any of your images that are called are not
being found.
Your image source could be: src="images/anImage.jpg"
but due to the rewriting, this will be rewritten to
index.php?cat=images&subcat=anImage.jpg
Try to be more specific with your rewrite rule, so that "images" is not
rewritten. Are your categories and subcategories numerical? Or are they
text?
Regards
Dave
More information about the thelist
mailing list