开发者

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]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜