I have a website, and the builder put in this code into my .htaccess:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]*)(\.php)?(\?*)$ index.php/$1$3 [L,QSA]
But, what i also need is:
– remove slash if it is no directory
– remove extension .php
– remove index.php if it is in de url
Ive tryed many suggestions, but i think it is in the code that is already in de .htaccess.
i’ve managed to redirect the site to www. if not given in the url
Does anyone have an idea? i’m out of ideas
Before the rules that you already have, try adding these: