Here’s my current rule:
RewriteRule (.*) view.php?id=$1
However, I still need certain files to differ. When the site is visited to root (so that (.*) is basically empty), index.php should be shown, as usual. Then there are a few PHP-files that need to be accessible by their default filename.
Any help is appreciated.
EDIT:
Here’s my code based on Crunch’s advice:
RewriteRule (.*)\.(css|js) - [L]
RewriteRule / - [L]
RewriteRule foo.php - [L]
RewriteRule (.*) view.php?id=$1 [L]
It seems that everything else works, except the root. As you can see, I removed the / from the filenames, as they didn’t work before. I don’t know any solution for the root, as I can’t take the / off it 😀
EDIT 2:
Fixed it with this kind of dirty, but working hack:
RewriteRule ^\s*$ - [L]
The dash
-means, that “nothing happens”.