You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by mathog <ma...@caltech.edu> on 2011/09/19 20:28:41 UTC

[users@httpd] Hidden 301 redirect buried somewhere in configuration

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@caltech.edu
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@httpd.apache.org


Re: [users@httpd] Hidden 301 redirect buried somewhere in configuration

Posted by Eric Covener <co...@gmail.com>.
On Mon, Sep 19, 2011 at 2:28 PM, mathog <ma...@caltech.edu> 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

mod_speling?

---------------------------------------------------------------------
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@httpd.apache.org


Re: [users@httpd] Hidden 301 redirect buried somewhere in configuration

Posted by Steve Swift <Sw...@swiftys.org.uk>.
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 <ma...@caltech.edu> 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<http://aserver/adirectory/178_hlah.html>
>
> does a 301 redirect to
>
>  http://aserver/adirectory/170_**hlah.html<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@caltech.edu
> 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<http://httpd.apache.org/userslist.html>>
> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.**apache.org<us...@httpd.apache.org>
>  "   from the digest: users-digest-unsubscribe@**httpd.apache.org<us...@httpd.apache.org>
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


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