I have a RewriteRule of the following form (there are some RewriteConds above it as well):
RewriteRule ^$|\.php - [F]
My intent is for it to match my root directory (^$) and any .php pages (\.php). My root directory (i.e., www.MyWebsite.com) has a hidden index.php in it. The RewriteRule works so I got the effect I wanted but, I later noticed that it also works the same if I just use the \.php. In other words, the \.php seems to be getting a match for www.MyWebsite.com (even when index.php is not explicitly listed in the URL).
I was wondering if someone could help me understand why. Not a critical issue but just wanting to understand.