I need some .htaccess code that will treat extensionless files as PHP files.
Suppose the visitors visits www.mywebsite.com/dir1/dir2/file.name, it will
www.mywebsite.com/dir1/dir2/file.name
You can write a rewriting rule which only takes into effect if the requested file doesn't exists.
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !\.php$ RewriteRule ^(.*)$ $1.php [L]