Erlang Mailing Lists

Author Message

<  Yaws mailing list  ~  redirect - path directive

Guest
Posted: Thu Feb 08, 2007 2:09 am Reply with quote
Guest
Hello Yawsers,

Currently the following is valid in a <redirect/> block:
Path = [Scheme://]Host[:Port]

It seems to me that this doesn't allow for local redirection where you
simply want to redirect one folder to another.
e.g requests to /old/ will be redirected to /new/
(Where /old may or may not exist as a physical folder)

I tried things like:
<redirect>
/old/ = myhostname/new/
</redirect>
with and without trailing slashes..
But of course the redirect ends up with a URL of something like
http://myhostname/new//old/
whereas it should be just http://myhostname/new/

Could the Path directive be extended to be something like the following?

Path = [Scheme://][Host][:Port][RedirectPath]

Where Host is optional and defaults to that of the request's host header.
Disambiguating RedirectPath & Host should be possible by requiring a leading
slash in the RedirectPath.
"/old = new" would assume "new" is a hostname
"/old = /new" would treat /new as the RedirectPath

It seems to me that such a basic type of redirection should be simple -
ie not require the admin to write and install a rewrite mod.

What do others think?
How would one currently go about redirecting a path (and therefore all
subpaths) to another path under the same host?

Cheers,
Julian Noble


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum