Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php remove extension from url

//put this piece of code in the root file .htaccess
RewriteEngine on
#remove extension html
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html [NC,L]

#remove extension php
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}.php -f 
RewriteRule ^(.*)$ $1.php
Comment

PREVIOUS NEXT
Code Example
Php :: laravel active menu item 
Php :: php limit string length 
Php :: how to find php.ini 
Php :: __construct 
Php :: how to connect database in php 
Php :: laravel run single migration 
Php :: zsh: command not found: laravel 
Php :: php console log 
Php :: php replace return character 
Php :: None of the supported PHP extensions (PgSQL, PDO_PgSQL) are available. 
Php :: drupal 8 get all nodes of type 
Php :: php call parent constructor 
Php :: php unset session variable 
Php :: image acf 
Php :: php check if parameter exists 
Php :: php server request method 
Php :: delete folder laravel 
Php :: php connect to postgresql 
Php :: Sorry, This File Type Is Not Permitted for Security Reasons 
Php :: php directory exists 
Php :: laravel hash check password, Verifying That A Password Matches A Hash 
Php :: php version change ubuntu 
Php :: php sec into date time 
Php :: undo php artisan optimize 
Php :: full url php 
Php :: get taxonomy name in singhle post 
Php :: print session in laravel 
Php :: laravel collection flatten 
Php :: laravel model to array 
Php :: laravel make migration controller resource mcr 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =