Problems with rewrite rules in htaccess

I have a problem with a .htaccess file.

I have a domainname (test1234.com for this example), and if visitors go to http://www.test1234.com everything works fine.
If they go to http://www.test1234.com/files/blablabla/nonexistingsfile.pdf they are redirected to the index.php file, but the path is not changed. So any files used in index.php which are referenced by a relative path "./cssfiles/main.css" for example are not found. Images which are included with "./graphics/logos/mylogo.png" are not shown.

I've attached my htaccess file. Anyone have any idea how to get this right?
htaccess_for_expertsexchange.txt
BelgianITGuyIT ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

ChrisCommented:
Sounds like, instead of a rewrite, what you actually want is an HTTP redirect. Change the final line to the following and see what happens.

RewriteRule ^(.*)$ /index.php [R=301,L]
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
BelgianITGuyIT ManagerAuthor Commented:
Hi Chris,

that was absolutely correct! Thanks a lot, you've saved me a lot of time.
0
BelgianITGuyIT ManagerAuthor Commented:
Thanks a lot for the fast (and correct) response.
0
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
mod_rewrite

From novice to tech pro — start learning today.