remove php extension, stop access of url with .php extension and remove trailing slashes
问题 I want my urls to be extensionless, so no .php extension, I also want there not to be an opportunity to access the URL with a trailing slash. The following removes php extension and thens redirects to the extensionless url if you try to access it with .php I started writing a rule to stop you accessing with a / and redirect, but it does not work, any help? #this removes php extension RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] # stops you accessing url with.php