Msg#: 4050886 posted 8:10 pm on Dec 29, 2009 (gmt 0)
> I can have more than one Rewritebase in an .htaccess? Yes. But rarely needed.
> If yes, then what ends a block of rewrites that follow a Rewritebase? Is it the next Rewritebase? Nothing 'ends a block of Rewrites'. Each RewriteRule 'ends' its own RewriteConds, but each rule stands by itself and ends itself.
The 'influence' of a RewriteBase directive continues, affecting all RewriteRules which follow it, until the next RewriteBase directive is found or until the end of the file.
You should not have to use RewriteBase on a normally-configured server, and if you do, then it is likely that the RewriteBases in each .htaccess file would be the same. It's only needed when the server config includes a mod_alias Alias directive or similar that essentially injects an extra or different 'directory level' into the filepath to which your URLs resolve.
Msg#: 4050886 posted 9:22 pm on Dec 29, 2009 (gmt 0)
If the redirects were placed in a subdirectory, how is the new destination referred to without the ability to place relative paths in the rule?
If the below code's location would be in a subdirectory's (named store) .htaccess and the new intended redirect destination was in its immediate parent directory, how would this be written for the new destination while maintaining an internal rewrite? (did I ask that correctly)
Msg#: 4050886 posted 9:34 pm on Dec 31, 2009 (gmt 0)
You can't specify 'path up to immediate parent' but you can specify 'path down from root-directory': RewriteRule ^index\.php/category/[^/]+/cPath/100$ /category-name-c-100.html [L]
However, you may have trouble determining that path if your code is in a subdirectory, because the path 'seen' by RewriteRule is 'localized' to the current directory. You could use a RewriteCond to get around this, or put the code into your root .htaccess file.