Search
 
SCRIPT & CODE EXAMPLE
 

PHP

remove trailing slash

## Remove trailing slash
RewriteRule ^(.*)/(?.*)?$ $1$2 [R=302,L]
Comment

Remove .php extension & Remove trailing slash

RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
RewriteCond %{THE_REQUEST} /([^.]+).php [NC]
RewriteRule ^ /%1 [R=301,NC,L,R]
RewriteRule ^(.*)/(?.*)?$ $1$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
Comment

PREVIOUS NEXT
Code Example
Php :: laravel collection partition 
Php :: array marge in php 
Php :: Getting the closest string match using php 
Php :: signup form in php 
Php :: pdo error message 
Php :: laravel eloquent duplicate record 
Php :: check current user role 
Php :: How do I get a YouTube video thumbnail from the YouTube API? 
Php :: sort php 
Php :: php pdo example 
Php :: smarty switch case 
Php :: php apns notification source code 
Php :: php null coalesce 
Php :: php try json decode 
Php :: saving an image from pc to php 
Php :: php switch case greater than 
Php :: codeigniter sanitize input field 
Php :: inplode php 
Php :: Predefined Constants php 
Php :: get data without pivot relation laravel 
Php :: how to go one folder back in __dir__ in php 
Php :: how do i know if file is empty in php 
Php :: laravel validation custom message example 
Php :: laravel when query 
Php :: how to loop by index in php 
Php :: using get in laravel blade 
Php :: laravel unique id 
Php :: laravel save file or picture directory 
Php :: seo_url.php location opencart 
Php :: quitar html con laravel 5 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =