Problems with rewrite rules in htaccess

I have a problem with a .htaccess file.

I have a domainname ( for this example), and if visitors go to everything works fine.
If they go to 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?
Who is Participating?
ChrisConnect With a Mentor Commented:
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]
BelgianITGuyAuthor Commented:
Hi Chris,

that was absolutely correct! Thanks a lot, you've saved me a lot of time.
BelgianITGuyAuthor Commented:
Thanks a lot for the fast (and correct) response.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.