Home Remove .php extesion with .htaccess
Reply: 0

Remove .php extesion with .htaccess

user554
1#
user554 Published in April 20, 2018, 6:04 pm

I am trying to remove my .php when someone visits a gallery on a client site. I found the following code that enables that but my .jpgs display "image cannot be displayed".

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]`

Any recommendations?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.305133 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO