httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chase <>
Subject Re: [users@httpd] Regular Expression Question
Date Thu, 28 Jul 2005 07:11:35 GMT

On Jul 28, 2005, at 1:43 AM, Chase wrote:

>> You could always create an errordocument CGI that returns a  
>> LOCATION header that sends them to :)
> actually, that was one of the first things i tried, but i couldn't  
> get it working.
> let me make sure that i understand you:
> do you mean to create a 404 page that does the redirection?
> if so, what is a straight html example of such a page?
> my web host will only allow plain html error pages, so i can't use  
> php or whatever.  it'll have to be plain, vanilla html.

correction:  i was mistaken about not being able to use php for  
404s.  i can easily override this setting in .htaccess, which i just  
tried and it works, but the redirect is just shooting me to the root  
of instead of to the corresponding path.

in other words, if i try:

... instead of going to:

... it goes to:

i mean, looking at the script, which i yanked from an online  
tutorial, it's obvious where the problem is:

Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location:" );

i just need to figure out how in php to get it to respect the entire  
original file path.

it probably won't be too hard.  if i get stuck, i'll post on a php list.

- chase

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message