apache - how hide extension of my php files -


i`m trying hide php files extension in hosted server.i add following code segment in .htaccess file.

rewriteengine on  rewritecond %{request_filename} !-d  rewritecond %{request_filename}\.html -f  rewriterule ^(.*)$ $1.html  rewriteengine on  rewritecond %{request_filename} !-d  rewritecond %{request_filename}\.php -f  rewriterule ^(.*)$ $1.php 

but when try, not working. tried same thing in localhost.it not working properly.

so have make other changes work on it?

use

rewriteengine on rewritecond %{request_filename} !-f rewriterule ^([^\.]+)$ $1.php [nc,l] 

Comments

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -