My current .htaccess file looks like this (autogenerated by WP)
$ cat .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/healthydebate/index.php [L]
</IfModule>
This is the standard WordPress rewrite setup. The issue I'm having is setting up site relative links within my pages (eg, a footer link pointing to terms-and-conditions.php). When I'm on the home page (ie: blog/index.html) the link works. When I'm on a sub page (ie: blog/categoryname/article-title) the link fails because, being a relative link, it is relative to blog/categoryname (ie: blog/categoryname/terms-and-conditions.php).
Before someone suggests "just use an absolute URL", this is not an option (or a best practice, really) because we are developing on a different domain and server structure than the final deployment server, so all absolute URLs would need to be rewritten every time we deploy.
To make the issue a little more complicated, we must also be root-directory-path agnostic. That is to say that even though the blog currently resides at /blog/clientsite/ it may eventually be moved to some other directory, for example /clientsite/ or even /STAGING/blogs/clientsite/ so RewriteBase may be a little tricky.
I'm sure the solution is dead simple, but mod_rewrite is definitely not my strong suit.