I've the next inside a .htaccess file like a test:

RewriteEngine on

RewriteRule ^(.*)$ /after sales/$1

This works not surprisingly. I could get rewrite logging dealing with the next in apache2.conf:

<IfModule mod_proxy.c>

    RewriteLog "/tmp/REWRITE.log"

    RewriteLogLevel 9

</IfModule>

The log file is produced and logs debug info not surprisingly. However, after i remove the .htaccess file, alter the apache2.conf directive the following, and restart apache to complete the same globally, it does not work.

<IfModule mod_proxy.c>

    RewriteLog "/tmp/REWRITE.log"

    RewriteLogLevel 9

    RewriteEngine on

    RewriteRule ^(.*)$ /after sales/$1

</IfModule>

I am using Apache/2..55 on Ubuntu.

Help!

Have you thought about turning RewriteEngine on before every other rewrite directives?

Are the RewriteRule directives contained inside a particular server definition? Have you got virtual servers at the office?

The main reason I request this is you say this works within an .htaccess file that is directory specific although formally the documentation states that RewriteRule can use to server config, virtual host, directory, .htaccess.

Perhaps you have attempted this ?

    RewriteEngine on
    RewriteRule ^(.*)$ /backend/$1

<IfModule mod_proxy.c>
    RewriteLog "/tmp/REWRITE.log"
    RewriteLogLevel 9

</IfModule>

Because by doing this I could do spinning, but log didnt labored hence a problem in mod_proxy.c