elin-r
2/24/2018 - 5:08 AM

Hide PHP in URL's

You can do this in the following way:
Either put this code in your htaccess file (which you don't want), or put this code in your's server's configuration file:

// htaccess works for Apache, but for NGINX, you need to edit the server block of the domain to allow that.

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}\.php -f
  RewriteRule ^(.*)$ $1.php
</IfModule>
this will hide .php from all urls of your website.

That's it.