Search
 
SCRIPT & CODE EXAMPLE
 

PHP

hide php extension htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

#This works with xxx/index.php too (visiting mysite.com/xxx/)
Comment

PREVIOUS NEXT
Code Example
Php :: west african timezone in php 
Php :: Laravel 7 create-project 
Php :: Find out how many years there are in php between years 
Php :: php implode as key value of object 
Php :: for loop php continue to next item 
Php :: doctrine php driver execption 
Php :: php check if extension is installed 
Php :: increase the number in php by a certain percentage 
Php :: php how to count array 
Php :: laravel blade date format 
Php :: laravel dropIndex 
Php :: check if value exists in object php 
Php :: laravel plural 
Php :: php convert date from dd/mm/yyyy to yyyy-mm-dd 
Php :: redirect 301 wordpress 
Php :: wordpress post excerpt from post id 
Php :: phoenix input type password 
Php :: laravel save relationship to authorized user with parameter 
Php :: how to check php string length 
Php :: laravel create model with migration and controller 
Php :: php replace method that takes infinite input 
Php :: carbon add days 
Php :: laravel pass parameter to resource collection 
Php :: wordpress disable posts 
Php :: erd in phpmyadmin 
Php :: I need help 
Php :: remove spaces from string php 
Php :: display nav menu in frontend using Wordpress 
Php :: php check if string or number 
Php :: laravel dusk run failed tests 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =