This is beyond my level and I need some help.
In the htaccess make redirect rules for the following...
- if
example.com/1stleveldirectory
doesn't end in a slash add one. - if
example.com/1stleveldirectory/
ends in a slash don't add anything. - if
example.com/1stleveldirectory/file
is like this add .html. - if
example.com/1stleveldirectory/file.html
is like this don't add anything.
There are no publicly accessible directories past the first level
Thanks!
EDIT: I should have said I already have this code at the top of the file.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.([^.]+.[^.]+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Options +FollowSymLinks
RewriteRule ^([^/]*)/([^/]*)\.html$ /index.php?cat=$1&name=$2 [L]
RewriteRule ^([^/]*)/$ /index.php?cat=$1 [L]