htaccess file extension

Solutions on MaxInterview for htaccess file extension by the best coders in the world

showing results for - "htaccess file extension"
Sofia
26 Jan 2018
1RewriteEngine On
2RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\ HTTP/
3RewriteRule ^(.*)index$ http://example.com/$1 [L,R=301]
4
5RewriteCond %{REQUEST_FILENAME} !-d
6RewriteRule ^([^/]+)/$ http://example.com/$1 [L,R=301]
7
8RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.+)\.php\ HTTP/
9RewriteRule ^(.+)\.php$ http://example.com/$1 [L,R=301]
10RewriteRule ^([a-z]+)$ /$1.php [L]
11
similar questions
htaccess for angular