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

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -