I've got a site that sits inside a directory on the domain:

http://www.example.com/site/

I additionally come with an .htaccess file in /site/ that has several rewrite rules. These rules work if all of the files (such as the .htaccess file) sit on top-degree of the domain: e.g., at www.example.com.

My .htaccess file looks something similar to this:

RewriteEngine On
RewriteBase /

RewriteRule ^css/loader/\d+/([^/]+)(\?(.*))?$  /loader.php?t=css&c=$1

I want the guidelines to operate inside the directory however i can't appear to determine it, can anybody help?

Edit: figured it, server was on Apache 1.2+ which utilizes the POSIX regex engine instead of the PCRE engine in Apache2.

Change RewriteBase to /site/ rather than /

Edit: figured it, server was on Apache 1.2+ which utilizes the POSIX regex engine instead of the PCRE engine in Apache2.

Don’t alter the base URL (take away the RewriteBase directive) and employ a family member path inside your substitution:

RewriteRule ^css/loader/\d+/([^/]+)$  loader.php?t=css&c=$1