Re: Hidden 301 redirect buried somewhere in configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Do you have an Errordocument 404 directive that is causing the redirect? Perhaps by running a CGI?

The configuration files can come from places other than the "conf" directory, such as the directory conf.d

I wrote myself a simple CGI script to expand out the base httpd.conf and any "Include" statements that it finds. The result is a webpage that displays a "monolithic" version of the configuration which is identical (in effect) to what is running. I find this invaluable when I can't work out which configuration statement is causing something.

On 19 September 2011 19:28, mathog <mathog@xxxxxxxxxxx> wrote:
At some point in the last couple of years I did something which was
apparently too clever by half to our 2.2.14 server so that this:

 http://aserver/adirectory/178_hlah.html

does a 301 redirect to

 http://aserver/adirectory/170_hlah.html

Now I can't find whatever configuration accomplishes this!
Tried to find it by modifying httpd.conf with

  RewriteLog logs/rewrite_log
  RewriteLogLevel 9

but the log file does not show the 178->170 redirect (it does show
one redirect test for "aserver" failing, which is as it should be).

Grep'd for 170 and 178 in all the files in the conf directory, but found nothing.
No .htaccess file in "adirectory" or in ~apache, which is what the server runs as.
In "adirectory" there is no 178_blah.html file.
Putting in another number, like 165_blah.html gives a 404 not found error.

Put a file 178_blah.html into adirectory, and then restart the server.  After
that the physical file is used instead of the mysterious 301 redirect.  No
error or warnings result.  So apparently the 301 redirect happens only after
the direct file access has failed.

Any ideas where else the 301 redirect might be?

Thanks,

David Mathog
mathog@xxxxxxxxxxx
Manager, Sequence Analysis Facility, Biology Division, Caltech


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
 "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




--
Steve Swift
http://www.swiftys.org.uk

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux