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?

1 Answer 1

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.

2
  • 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, 2012 at 3:06
  • e and o begin to look the same late at night
    – xVagabondx
    Jul 24, 2012 at 3:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .