Hey guys,
- I have read lots of the other posts on trailing slashes, and removing file extensions, but can't seem to figure it out (sorry about that).
I am working on a site, and have a seemingly simple structure (no variables or ?id=xyz, etc).
My goal is to basically remove all .php endings from my files, and still have the site function like normal.
[
dupreeandcompany.com...] works perfectly (but i dont want end user seeing the PHP portion)
[
dupreeandcompany.com...] works perfectly
[
dupreeandcompany.com...] currently directs to -> [
dupreeandcompany.com...]
Here is the HTACCESS code i have in there now:
-------------------------------------
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+\.php
RewriteRule (.*)\.php$ /$1/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)/$ $1.php [L]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule .*[^/]$ $0/ [L,R=301]
<Files 403.shtml>
order allow,deny
allow from all
</Files>
-------------------------------------