Mailing List Archive

redirecting urls
Hi there
Ive apache installed on a suse linux 7.2 box, and im about to declare the
web server live this week. One problem i have though is in the url
redirection . In the example below, j.burns directory no longer exists and
is now held in the direcotry john ( ie the public_html direcotry of the user
johnny). The directory johnny exists and the destination url exists. However
if I try the redirect, I get no erroe after restarting. If I try to access
j.burns it cant find it, and theses no error in the error log. Is there
anything else I need to do for the redirection to be enabled
Thanks
Martin Moriarty
Systems Administrator
UCC
Cork
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Format: Redirect old-URI new-URL
#
Redirect http://server2/~j.burns http://server2/~johnny
#
# Directives controlling the display of server-generated directory listings.
#


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: redirecting urls [ In reply to ]
Martin Moriarty wrote:
>
> Hi there
> Ive apache installed on a suse linux 7.2 box, and im about to declare the
> web server live this week. One problem i have though is in the url
> redirection . In the example below, j.burns directory no longer exists and
> is now held in the direcotry john ( ie the public_html direcotry of the user
> johnny). The directory johnny exists and the destination url exists. However
> if I try the redirect, I get no erroe after restarting. If I try to access
> j.burns it cant find it, and theses no error in the error log. Is there
> anything else I need to do for the redirection to be enabled

> #
> Redirect http://server2/~j.burns http://server2/~johnny

You're not using "Redirect" correctly. The first argument is supposed to
be a decoded URL-path, i.e. the file that your server gets after it
decodes the URL. The second argument is a full URL. So, you should put:

Redirect /~j.burns http://server2/~johnny

Rgds,

Owen Boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
RE: redirecting urls [ In reply to ]
works a treat Many thanks
Martin

-----Original Message-----
From: obo@bourse.ch [mailto:obo@bourse.ch]
Sent: 29 January 2002 11:06
To: users@httpd.apache.org
Subject: Re: redirecting urls


Martin Moriarty wrote:
>
> Hi there
> Ive apache installed on a suse linux 7.2 box, and im about to declare the
> web server live this week. One problem i have though is in the url
> redirection . In the example below, j.burns directory no longer exists and
> is now held in the direcotry john ( ie the public_html direcotry of the
user
> johnny). The directory johnny exists and the destination url exists.
However
> if I try the redirect, I get no erroe after restarting. If I try to access
> j.burns it cant find it, and theses no error in the error log. Is there
> anything else I need to do for the redirection to be enabled

> #
> Redirect http://server2/~j.burns http://server2/~johnny

You're not using "Redirect" correctly. The first argument is supposed to
be a decoded URL-path, i.e. the file that your server gets after it
decodes the URL. The second argument is a full URL. So, you should put:

Redirect /~j.burns http://server2/~johnny

Rgds,

Owen Boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org