1

i have a server with apache2.2 hosting multiple virtualhosts, with a handful of domains containing a keyword(eg. "foo123") all being rewritten/redirected to another one of my hosted domains. all my other domains work as expected.

the problem is that i can't find this elusive rule anywhere.

i've checked:
my apache2.conf (multiple times)
httpd.conf (empty)
each site's config in /etc/apache2/sites-enabled & sites-available
each site's .htaccess file under /var/www/
/etc/apache2 recursively with grep (also by hand with nano)
/var/www recursively with grep
/etc/php5 recursively with grep (just to be sure)
iptables

i also checked my dns records on my host's control panel, as well as tried debugging with apache's RewriteLog(set at 4, then 9) enabled, but no such luck.

am i missing something?

xVagabondx
  • 13
  • 2

1 Answers1

0

Yes, you're missing your PHP code. Apache's not the only thing that can send a 30x response to a client system. A RewriteRule or Redirect is how Apache can be configured for it, but PHP code can modify the response code and headers at will.

Take a close look at the exact HTTP request and response when you get a redirect - that should help point you (or us) in the right direction. From the information you've provided, I suspect that the PHP application feels that requests should come in with a specific host header that it's configured for, and it's redirecting those that don't fall under that header.

Shane Madden
  • 112,982
  • 12
  • 174
  • 248
  • thank you for your informative answer, but after scrutinizing my configs once more i found the problem... the time old spelling error(virtualhosts ServerName), of all things! the RewriteLog was the key :) again, thanks. – xVagabondx Jul 24 '12 at 03:06
  • e and o begin to look the same late at night – xVagabondx Jul 24 '12 at 03:13