mod_rewrite - images not showing

Hi,
I have a re-write rule in my .htaccess file as :

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule ([0-9]+)(.*)\.html$ index.php?page_id=$1

Which sends

http://mywebsite.com/51/Computer/Computer.html

to

http://mywebsite.com/index.php?page_id=51 

Everything seems to be working OK except that images are not showing up on some pages

Image links are showing as

http://mywebsite.com/51/Computer/images/clear.gif

http://mywebsite.com/51/Computer/uploads/PN355_1_sml.jpg

instead of

http://mywebsite.com/images/clear.gif

http://mywebsite.com/uploads/PN355_1_sml.jpg

Can anyone tell me what I am doing wrong?
sabecsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mmrs151Commented:
Currently you are redirecting all your request to index page.

You have to allow /image and /upload sub-directory from your .htaccess to be able to access.

Hope that will solve your problem.
0
sabecsAuthor Commented:
Thanks mmrs151, how do I do that?
0
mmrs151Commented:
Well, that's easy.

Before your 'RewriteRule ([0-9]+)(.*)\.html$ index.php?page_id=$1' write the following
RewriteRule ^images/(.*)$ images/$1 [L]
and
RewriteRule ^uploads/(.*)$ uploads/$1 [L]

Hope that helps.
0
sabecsAuthor Commented:
Thanks mmrs151 for your help, I added the above rules but I still have the same problem.?
0
sabecsAuthor Commented:
Problem wasn't the rewrite rule, fixed this by changing img src values to absolute paths (which begin with a slash to anchor them to the document root of your server).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.