automatically grab php extension in xampp
i m using xampp
any project that is saved in htdocs is open in http://localhost/projectname/filename.php
i want that is there any way to do so when i type
http://localhost/projectname/filename and open that page
开发者_JS百科
means no need to write .php extension in file( by default extension should be php)
You can use mod_rewrite for this. In .htaccess
:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.+) $1.php [L]
精彩评论