You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Pete Moran <pe...@forloop.co.uk> on 2004/03/25 07:17:15 UTC
File Not Found
Hi All,
I think a example is easier to explain this problem.
I have a configuration as follows
<Directory "/var/website/htdocs/wl/uk">
PerlSetEnv EMBPERL_OBJECT_ADDPATH
/var/website/htdocs/wl/uk;/var/website/htdocs/library/shared;/var/website/htdocs/library
Embperl_AppName ukwl
Embperl_Object_Base base.epl
Embperl_UriMatch "\.html.?|\.epl$"
SetHandler perl-script
PerlHandler Embperl::Object
Options ExecCGI
</Directory>
Let me explain what does work, if I have index.html which lives in
/wl/uk/ and it calls the file me.html which lives in /library/shared/
then the contents of me.html gets loaded just fine. If however I do a
direct call to me.html I always get a 404 error.
Is there any way of changing this behaviour - so if I request
/wl/uk/me.html it actually executes /shared/library/me.html if it
doesn't exist in /wl/uk/me.html ?.
Regards
Pete
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
RE: File Not Found
Posted by Pete Moran <pe...@forloop.co.uk>.
Thanks Gerald,
Will co and play
Regards
-----Original Message-----
From: Gerald Richter [mailto:richter@ecos.de]
Sent: 04 April 2004 21:56
To: pete@forloop.co.uk; embperl@perl.apache.org
Subject: Re: File Not Found
>
> Is there any way of changing this behaviour - so if I request
> /wl/uk/me.html it actually executes /shared/library/me.html if it
> doesn't exist in /wl/uk/me.html ?.
>
The lastest CVS version also contains a directive Embperl_Object_Reqpath
which might excatly do what you want
Gerald
------------------------------------------------------------------------
---
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
------------------------------------------------------------------------
---
Besuchen Sie uns auf der CeBIT (18. - 24. März 2004)
Halle 6 Stand B38-452
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
------------------------------------------------------------------------
---
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.627 / Virus Database: 402 - Release Date: 16/03/2004
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: File Not Found
Posted by Gerald Richter <ri...@ecos.de>.
>
> Is there any way of changing this behaviour - so if I request
> /wl/uk/me.html it actually executes /shared/library/me.html if it
> doesn't exist in /wl/uk/me.html ?.
>
The lastest CVS version also contains a directive Embperl_Object_Reqpath
which might excatly do what you want
Gerald
---------------------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der CeBIT (18. - 24. März 2004)
Halle 6 Stand B38-452
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: File Not Found
Posted by Gerald Richter <ri...@ecos.de>.
>
> Let me explain what does work, if I have index.html which lives in
> /wl/uk/ and it calls the file me.html which lives in /library/shared/
> then the contents of me.html gets loaded just fine. If however I do a
> direct call to me.html I always get a 404 error.
>
> Is there any way of changing this behaviour - so if I request
> /wl/uk/me.html it actually executes /shared/library/me.html if it
> doesn't exist in /wl/uk/me.html ?.
>
In your base.epl instead of writing
Execute ('*') ;
write
$r = shift ;
Execute (basename($r -> param -> filename)) ;
The path is only searched if the filename that is passed to Execute does not
have a path inside
Gerald
---------------------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 939-122
WWW: http://www.ecos.de/ Fax: +49 6133 939-333
---------------------------------------------------------------------------
Besuchen Sie uns auf der CeBIT (18. - 24. März 2004)
Halle 6 Stand B38-452
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org