0

So I'm using this

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

To get rid of the .php in my URL. So here's what happens. I have a folder named good, and an index.php inside it, now when I go to localhost/good I end up getting a 404 not found. I assume that this is because of my .htaccess. Any ideas?

idris
  • 1,019
  • 1
  • 9
  • 22
  • 1
    That `RewriteCond` is commonly accompanied by another one for `-d` directories. – mario Aug 21 '14 at 21:53
  • Albeit checking for existence of the .php script is the better option: [Removing the .php extension with mod\_rewrite](http://stackoverflow.com/q/4908122) – mario Aug 21 '14 at 21:55

0 Answers0