I fronted a local test Tomcat server with Apache with mod_proxy and mod_rewrite using .htaccess to contain my rewrite rules. It works but the problem I have is that whenever a rule is invoked, the session is lost. I have found the following reference for such a problem but they don't seem to apply when the rewrite rules reside in .htaccess or I'm a bit confused as to where to place the ProxyPassReverse and ProxyPassReverseCookiePath directives and how to write the rewrite rules shown in the sample from the discussion in this link below. http://objectmix.com/apache/666802-tomcat-session-lost-mod_rewrite-mod_proxy.html This is a typical rewrite rule in my htaccess file. It WORKS but the session is lost. RewriteRule ^events-category/(.[^/]*)/$ /events/actions/events_by_category.do?category=$1 [L] My question is how do I configure httpd.conf or .htaccess so that the session is not lost when a rewrite rule is invoked. Any help is greatly appreciated. Here is my step by step instruction for fronting Apache to Tomcat using mod_rewrite, and mod_proxy, and htaccess with Apache HTTP version 2.2.17 ,Tomcat version 6.0.32 and Win 7 on a local test server. Hope that anyone wishing to get as far as I did will find it useful. I repeated the steps from sctatch so I know it works with the versions cited above. 1 . Download and install and test Tomcat. 2. In <CATALINA_HOME>/conf/server.xml uncomment <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> 3. This is all you have to do for Tomcat 4. Download install and test Apache HTTP. All the modules are included with the versions cited above. 5. In the directory <top apache directory node>/conf create the file workers.properties and write the following line worker.testworker1.host = 127.0.0.1 into that file. I'm not sure this is needed for a single Tomcat worker but I did it anyway. 6. In .../conf/httpd.conf un-comment the following lines LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule rewrite_module modules/mod_rewrite.so 7. In the main section of .../conf/httpd.conf just under the line beginning with the words ServerAdmin around line 163, add: RewriteEngine On and under that replace the lines with the following lines. ProxyRequests Off ProxyPreserveHost On <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /examples/jsp ajp://127.0.0.1:8009/examples/jsp ProxyPassReverse /examples/jsp ajp://127.0.0.1:8009/examples/jsp <Location /examples/jsp> Order allow,deny Allow from all </Location> 8. Somewhere below line 200 in httpd.conf you will see a commented line saying "# This should be changed to whatever you set DocumentRoot to." Make sure the directory it refers to points to the DocumentRoot which is referenced earlier in http.conf. 9. Within this same directory node you will see the line Options Indexes FollowSymLinks a few lines down. Change this line to read Options Indexes FollowSymLinks Includes ExecCGI and the line below that which reads AllowOverride None should be changed to read AllowOverride All 10. Create the file .htaccess, and write the following lines to that file: Options +FollowSymlinks RewriteEngine on and save that file in your document root (see the references in httpd.conf). It is within this file that you will write your rewrite rules and conditions below the lines you just wrote. 11. Start Tomcat first and then Apache HTTP. 12. In your browser address bar type the following: http://localhost/examples/jsp/ If you see the JSP Samples page that resides in the tomcat servlet container you've done everything successfully and Apache is front ending Tomcat. Notice that there are no port numbers in the URL. 13. Now to test that mod_rewrite is working past the following line at the bottom of .htaccess. RewriteRule ^TestModRewrite/ /examples/jsp/ [L] You do not need to restart Apache or Tomcat. Type the following address into your browser and if mod_rewrite is working you will arrive at the same page. http://localhost/TestModRewrite/