I want the URL http://domain.com/myfile
to access http://domain.com/myfile.php
I figured the following rewriteRule would do it:
RewriteRule ^([^/]+)/?$ $1.php
In my head it should grab everything up to the slash, with a slash being optional, and get that grabbed stuff with a .php ending, however, I get a 500 error.
So, I tried the following 2 possiblities:
RewriteRule ^([^/]+)$ $1.php # type domain.com/filename into the browser
RewriteRule ^([^/]+)/$ $1.php # type domain.com/filename/ into the browser
Oddly enough, the first of these two options results in a 500 error, and the second works fine.
Does anyone know what I'm doing wrong here?