lucy24 - 8:57 pm on Oct 19, 2012 (gmt 0)
Basically this says if a file exsits then go to it else direct it to index.php.
It says: if a file exists (-f) at the URL requested, then serve content from that location.
If there is no directory at the URL requested, then serve content from index.php.
It does not say what happens if there is no file (!-f) at the URL requested. What happens if someone asks for a nonexistent image? Or, conversely, what happens if there really is a directory there. (Possibly there aren't any, so the situation wouldn't arise.)
I am losing my non-www to www functionality given in my main sites htaccess which is
(correctly worded redirect)
if this comes after the Rewrites you quoted above, you have got yourself into a potentially disastrous mess.
I have doubts about this, and the more I think about the code I think it is in the actual script rather than this htaccess, but is there any way possible to have actual articles as name.php? In the example above all categories and actual articles are shown as folders for the url. So something like www.example.com/category/article1.php instead of www.example.com/category/article1/
Does each pseudo-folder contain only one article? Then you might argue that its name should be
with no trailing slash. But you are welcome to let the user think each article is in its own little folder. They're all made-up anyway.
In any case you need to put your 301 redirects before the rewrites. This should have no effect on the final handling of the cms area, so long as it's carefully written, but will ensure that everyone starts out on the same metaphorical page.
Does the CMS serve contact from
www.example.com/news/index.php et cetera
I'd expect to see the word /news/ somewhere in those rules. But not in the RewriteBase, which you have properly commented out.