0

I have a httpd.conf file with some redirects like this:

<Directory "${SRVROOT}/htdocs">
    Options Indexes FollowSymLinks ExecCGI

    AllowOverride None

    Require all granted

    Redirect /just-text https://other.site.tld/directory?query
</Directory>

They were working just fine, then I changed them to point at a different target. I restarted Apache (httpd -k restart as administrator) but the redirects still pointed at the old target. I restarted the server itself and the same thing happened -- the old targets were somehow still being followed, despite not appearing anywhere in the file.

I was able to replicate this in a new browser from another machine that had never seen the website before, so it's not a browser cache issue (could be a server cache issue of course, though cache_module isn't loaded). Any ideas?

I'm running Apache/2.4.29 (Win32) on Windows Server 2012R2.

  • Have you cleared your DNS from the operating system? browser? and router? since redirects are often cached locally, not just on the web server. Try an online CURL rather than testing the redirect using your computer. – Simon Hayter Aug 3 '18 at 21:35
  • @SimonHayter No dice. I even tried it from another machine at another location (not sharing network infrastructure). – Charles Aug 3 '18 at 22:12
  • Like Simon, I recommend testing with curl on the command line. It removes a lot of headaches associated with browser cache. I'd trust it even over finding another machine. – Stephen Ostermiller Aug 4 '18 at 0:04
  • This could also be caused by a caching proxy or content delivery network (CDN). If you have a proxy or CDN, it also needs to be restarted or cache flushed. You can bypass a CDN using curl https:// DOMAIN.TLD --resolve "DOMAIN.TLD:443:IP_ADDRESS" to specify the the direct IP address for your upstream server. source – Stephen Ostermiller Aug 4 '18 at 0:05
  • @StephenOstermiller That's... interesting. I'm not running a CDN or a proxy server, but curl was able to get the right page. – Charles Aug 4 '18 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.