So thanks again for your continued tenacity on this. It does appear that perhaps I did not clearly state my intentions or the goal got muddled somewhere along the way.
RewriteRule ^content(.*) index.php
Where is the LAST flag OR do you mean to AND this with the mutually exclusive start with component/?
RewriteRule ^component/(.*) index.php
Ditto. Just like ANY programming language, you need to terminate your (block) statements!
These lines are part of the .htaccess file supplied with the CMS (Mambo/Joomla). I don’t doubt that they have inefficiencies or bad practice, but I did not write them nor did I write any of this code really
I wish I understood more than the very fundamentals (though I am questioning that statement given your reactions to the code).
As far as I can tell they allow URI’s like this
/content/view/379/30/
to be processed like this:
/index.php?option=com_content&task=view&id=379&Itemid=30
On a vanilla install with nothing else in my .htaccess, that works fine and is how the site has been running and linked to for years. For the avoidance of domain these only need to do the work on actualdomain.com.
Options +FollowSymLinks
This is a little late, isn't it?
Very probably, but it was not included in the original .htaccess but was used in the snippet I obtained from elsewhere but it worked and did not interfere with the CMS authored code.
So starting with the baseline functionality above:
I want to ensure that when someone goes to:
http://www.actualdomain.com/index.php
that it redirects to
http://www.actualdomain.com/
with a 301 redirect.
In reference to the code it would be a good idea to ensure that only URL’s prefixed by the actualdomain.com instead of the hack used.
At this point in my site’s lifetime I decided to move hosts, which I did successfully, however, the test URL (server.hostingcompany.com/~myhostingusername/) given to me prior to the domain propagating over, got into the wild somehow (my fault) and ended up with links to that URL with valid URI’s:
http://server.hostingcompany.com/~myhostingusername/content/view/379/30/#
At this point I decided it would be best to ensure any URL requested beginning
http://server.hostingcompany.com/~myhostingusername/
had any superfluous suffix stripped, and re appended to
http://www.actualdomain.com/
Sorry if that was not clear from the first post with the * as wildcards, but hopefully the full context of why clears it up.
DD