Masking the URL in a mod_rewrite

I can give you three ways of doing this.

1 Using virtual hosts

Given that bacon.com is a ServerAlias for example.com, i.e. they're both on the same server, you can do this without using any mod_rewrite at all. Think of it this way: mod_rewrite is at its most basic a way to map URLs to a file system. So what I would do is to simply set up a separate VirtualHost that uses the correct directory as its base.

Here's a brief example:

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName example.com
  DocumentRoot /www/files

  [... all other config you have for example.com]
</VirtualHost>

<VirtualHost *:80>
  ServerName bacon.com
  DocumentRoot /www/files/bacon

  # To have CSS directly under /www/files/css instead of /www/files/bacon/css
  Alias /css /www/files/css

  [... all other config you have for bacon.com]
</VirtualHost>

As you see, this isn't a rewrite; instead you're setting bacon.com up to use the base directory of example.com/bacon as its own DocumentRoot.

2 Using mod_rewrite as a proxy

If you do want to use mod_rewrite instead, you can have it use the P flag which will make mod_rewrite act as a proxy. Here's an example:

RewriteRule /(.*) http://example.com/bacon/$1 [P]

Edit in answer to the comment:

Since you want the http://bacon.com/css to be http://example.com/css instead of http://example.com/bacon/css, make a separate rule that goes first and catches that specific URL:

RewriteRule /css/(.*) http://example.com/css/$1 [P]
RewriteRule /(.*) http://example.com/bacon/$1 [P]

In order to do this, you need to have mod_proxy loaded and enabled. Do however note that this will reduce performance compared to using mod_proxy directly, as it doesn't handle persistent connections or connection pooling. So if you can't do what you want with VirtualHosts, I'd suggest the third method:

3 Using mod_proxy directly

<VirtualHost *:80>
  ServerName bacon.com

  ProxyPass http://example.com/bacon
  ProxyPassReverse  http://example.com/bacon
</VirtualHost>

For more information about that, see the mod_proxy documentation