I've got several domains/vhosts, all hitting the same python app (on mod_python, apache 2.0.52). So, for example, the mapping should be something like this:
domain1.com => thisserver.com/page/view/domain1/
domain2.com => thisserver.com/page/view/domain2/
And so on ...
I've got rewrite rules that appear to be working:
- Code: Select all
RewriteEngine on
RewriteLog /blahblahblah/logs/my_rewrite.log
RewriteLogLevel 9
RewriteCond %{HTTP_HOST} ^domain1\.com [NC]
RewriteRule ^/$ http://thisserver.com/page/view/domain1/ [P]
RewriteCond %{HTTP_HOST} ^domain2\.com [NC]
RewriteRule ^/$ http://thisserver.com/page/view/domain2/ [P]
They work perfectly on a local testing environment (OS X, also mod_python/apache 2.0.52). The problem comes when I move to our dev environment. I can see the proxy request in the rewrite log:
- Code: Select all
(4) RewriteCond: input='domain1.com' pattern='^domain1\.com' => matched
(2) rewrite / -> http://thisserver.com/page/view/domain1/
(2) forcing proxy-throughput with http://thisserver.com/page/view/domain1/
(1) go-ahead with proxy request proxy:http://thisserver.com/page/view/domain1/ [OK]
(4) RewriteCond: input='domain2.com' pattern='^domain2\.com' => matched
(2) rewrite / -> http://thisserver.com/page/view/domain2/
(2) forcing proxy-throughput with http://thisserver.com/page/view/domain2/
(1) go-ahead with proxy request proxy:http://thisserver.com/page/view/domain2/ [OK]
But instead of the page I'm expecting, I get a big ol' 404.
So clearly the problem is the environment, not the mod_rewrite. What other things should I be looking at? mod_proxy is loaded ... I'm just not sure what else to look for.