Answers for "how to hide extention .php on page web url"

PHP
1

hide php extension in url

Options +MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Posted by: Guest on February-05-2021
0

how to hide .php extension in url

# Run Php without filename extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php

# Return 404 if original request is .php
RewriteCond %{THE_REQUEST} "^[^ ]* .*?\.php[? ].*$"
RewriteRule .* - [L,R=404]
Posted by: Guest on August-29-2021

Code answers related to "how to hide extention .php on page web url"

Browse Popular Code Answers by Language