I don't see what any of those questions have to do with mod_rewrite, but ok... My setup is one instance of Apache, with a <VirtualHost> for each site. Each site has their own .htaccess file. It's all quite simple.

# Get the port from the original request.RewriteRule ^one$ /two?sp1=%{SERVER_PORT} [QSA,L]# Get the port after a rewrite.RewriteRule ^two$ /three?sp2=%{SERVER_PORT} [QSA,L]# Get the port after another rewrite.RewriteRule ^three$ /four?sp3=%{SERVER_PORT} [QSA,R,L]

Go to /one and it should redirect to show the ports at each step. This will show if rewriting is the problem.

What happens if you don't use a <VirtualHost> and just set the server to listen on port 8880? This will show if the problem is Apache/mod_rewrite or the other modules your are using.