DroidPinkman
3/23/2019 - 2:34 PM

PHP Extension Stripper

Strip .php extensions on Apache using .htaccess

# ------------------------------------------------------
# strip .php files of file extension
# ------------------------------------------------------
# rewrite strictly for files ending in .php
# Instead of your sites files as this => domain-name.com/file.php
# Rewrite so users can do this instead => domain-name.com/file

<IfModule mod_rewrite.c>
   RewriteCond %{REQUEST_FILENAME}.php -f
   RewriteRule ^(.*)$ $1.php [L]
</IfModule>