Mailing List Archive

default script ?
hi,

I want to have a default scripts, what I mean. Let say I make the following request :

http://mysite.com/blah/script.asp

which normaly will invoke :

/document/root/blah/script.asp

What I want instead is :

if '/document/root/blah/script.asp' does not exist
then
if '/document/root/mydefaults/blah/script.asp' exists
then call the defaults
else complain that file does not exists
else go as normal


Is this possible ? if not where i have to look at ASP.pm so i can make it work ?

tia

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org
Re: default script ? [ In reply to ]
I guess one of the ways to solve your issues is to have an error document in
your apache configuruation
say something like
ErrorDocument 404 /trapnotfound.asp

and in your error document you could put all your document redirection
logic, and then redirect to the desired / default script accordingly

Hope this helps ..


Arun


----- Original Message -----
From: "raptor" <raptor@tvskat.net>
To: <asp@perl.apache.org>
Sent: Monday, February 07, 2005 3:29 AM
Subject: default script ?


> hi,
>
> I want to have a default scripts, what I mean. Let say I make the
following request :
>
> http://mysite.com/blah/script.asp
>
> which normaly will invoke :
>
> /document/root/blah/script.asp
>
> What I want instead is :
>
> if '/document/root/blah/script.asp' does not exist
> then
> if '/document/root/mydefaults/blah/script.asp' exists
> then call the defaults
> else complain that file does not exists
> else go as normal
>
>
> Is this possible ? if not where i have to look at ASP.pm so i can make it
work ?
>
> tia
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
> For additional commands, e-mail: asp-help@perl.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org