httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chase <xan...@juun.com>
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 foo.net :)
>>
>
>
> 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 foo.com instead of to the corresponding path.

in other words, if i try:

     http://www.foo.net/filename.htm

... instead of going to:

     http://www.foo.com/filename.htm

... it goes to:

     http://www.foo.net/


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: http://www.foo.com" );
?>

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: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


Mime
View raw message