I'm trying to add a RewriteRule, but it's not working: RewriteEngine on RewriteCond %{HTTP_HOST} !^www.animewallpapers.com(:80)?$ RewriteCond %{HTTP_HOST} !^64.246.28.97(:80)?$ RewriteRule ^/(.*) http://www.animewallpapers.com/$1 [L,R]
I want to make it so that if someone accesses that website via any hostname other than www.animewallpapers.com or 64.246.28.97, then it will redirect them to http://www.animewallpapers.com/. I copied those rules exactly from another httpd.conf where it works. However, the directives were being ignored. I realized the problem is probably because of this line: AccelPass / http://127.0.0.1:8010/ The site has a mod_perl backend running on port 8010. Apache is proxying those connections to port 8010 before it has a chance to invoke the RewriteRule above. I thought of putting the RewriteRule on the backend mod_perl, but I don't think it will work there because the HTTP_HOST would have been changed to 127.0.0.1. Any suggestions on how I can get the RewriteRule to take precedence over the AccelPass?