mod_rewrite problem



Hello everyone,

Im havin' problem with images in pages that were mod_rewrite-n.

So,

/blog/3/

is rewritten into

index.php?kom=blog&id=3

in .htaccess with directives:

RewriteRule ^blog/$ index.php?kom=blog [L]
RewriteRule ^blog/(.*)/$ index.php?kom=blog&id=$1 [L]

but images that have relative path <img src='images/image.jpg' /> are
problem because server appends image path to virtual directory /blog/
3/:

/blog/3/images/image.jpg

where I want it to append that path to the root:

www.domain.com/images/image.jpg

I would like to solve this through .htaccess.

I tried solving this problem with entering apsolute paths to my images
but Im unable to put apsolute path because Im using TinyMCE .js editor
that resolves all absolute paths into relative ones..

Also using slash in front of path (/images/image.jpg) isn't solving my
problem.

I found RewriteRule that should solve my problem but it doesn't work.
Here it is:

RewriteCond %{REQUEST_URI} !\.(exe|jpg|jpeg)$

Maybe Im not using it right, I don't know but this problem gives
headache for quite some
time now.

Thank you in advance

Luka

.



Relevant Pages

  • Re: mod_rewrite problem
    ... Im havin' problem with images in pages that were mod_rewrite-n. ... in .htaccess with directives: ... problem because server appends image path to virtual directory /blog/ ... I found RewriteRule that should solve my problem but it doesn't work. ...
    (alt.php)
  • mod_rewrite problem
    ... Im havin' problem with images in pages that were mod_rewrite-n. ... in .htaccess with directives: ... problem because server appends image path to virtual directory /blog/ ... I found RewriteRule that should solve my problem but it doesn't work. ...
    (alt.php)
  • mod_rewrite Directory Problem
    ... RewriteRule ^qqq/xxx$ database.php?cat=0 ... The problem is that database.php contains several relative paths to images. ... This means mydomain/qqq works fine and all the images are found but when typing mydomain/qqq/xxx the file database.php seems to think it is in the xxx directory and cannot find the images. ...
    (comp.lang.php)
  • Re: mod_rewrite Directory Problem
    ... RewriteRule ^qqq/xxx$ database.php?cat=0 ... This means mydomain/qqq works fine and all the images are ... What, apart from not using relative paths in database.php, can be done ... in the root directory and finds the images? ...
    (comp.lang.php)
  • mod_rewrite for subdomains query
    ... directives in my htaccess or rewriterule 's. ... the error log shows nothing,while access log gives a: ...
    (comp.infosystems.www.servers.unix)