All first 3 are working all right but the 4th one returns a:
403 error - You don't have permission to access / on this server
I do not known if index page naming is responsible and i am trying to redirect any requests for:
http://www.example.com/site4/ to http://www.example.com/site4/ProFI.html
If ProFI.html is functionally the index page of that directory, you have to say so. You can either make an expanded list in your primary htaccess
DirectoryIndex index.html index.php ProFI.html
or put the supplementary bit in its own little htaccess within that one directory:
DirectoryIndex ProFI.html
:: detour to re-check something ::
OK, that makes sense. DirectoryIndex directives
within the same context (here that means "in the same htaccess file") are cumulative. So a new directive in a new htaccess overrides anything earlier. I'd go with the second one, though it doesn't make a huge difference.
But really, why not just rename the file? You'd want a redirect in any case:
RewriteRule ^blahblah/ProFI\.html http://www.example.com/blahblah/ [R=301,L]
Since it's only one specific file, you don't need to capture anything. Spell out the exact name on each side of the rule.
########## End - RewriteEngine enabled
Huh what?
########## Begin - Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ [%{HTTP_HOST}...] [R=301,L]
## If the above throws an HTTP 500 error, swap [R=301,L] with [R,L]
This is, I take it, the part of joomla's htaccess that g1smd wasn't allowed to lay hands on. If you've got a single site using this htaccess file, it should be
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]