You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Dileep Eduri <di...@gmail.com> on 2008/04/15 20:27:56 UTC
Accessing CSS,JS and other files
Hi everyone...
I tried searching the forums, but got few clues..yet I don't have my doubts
clarified. Hence posting.
I am running Apache/2.2.6 (Unix) with mod_perl/2.0.3 Perl/v5.8.8
Recently I have started developing pages using mod_perl and when I tried to
link the CSS file or Javascript file, mod_perl is trying to execute them
(treating them as perl files). This is annoying.
When I searched thru' forums, came to know abt the <Files> section, which I
can use. But still after studying the documentation, I could not write a
proper <Files> section.
Can some one help in that?
This is my conf for mod_perl.
#Typical for Modperl::Registry
Alias /perl/ /var/www/perl/
PerlModule ModPerl::Registry
<Location /perl>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options ExecCGI
allow from all
PerlSendHeader On
</Location>
Do we need to write <Files> section before or after <Location>?
Thanks n Regards,
Dileep.
-----
With Best regards,
Dileep.
***************************************************
--
View this message in context: http://www.nabble.com/Accessing-CSS%2CJS-and-other-files-tp16703625p16703625.html
Sent from the mod_perl - General mailing list archive at Nabble.com.
Re: Accessing CSS,JS and other files
Posted by Dileep Eduri <di...@gmail.com>.
It worked...:jumping:
Thank you...
Michael Peters wrote:
>
> Dileep Eduri wrote:
>
>> When I searched thru' forums, came to know abt the <Files> section, which
>> I
>> can use. But still after studying the documentation, I could not write a
>> proper <Files> section.
>
> You don't need to use a <Files> section.
>
>> PerlModule ModPerl::Registry
>> <Location /perl>
>> SetHandler perl-script
>> PerlHandler ModPerl::Registry
>> Options ExecCGI
>> allow from all
>> PerlSendHeader On
>> </Location>
>
> One way is to simply not put the files under /perl :) If you have to do
> that,
> then put them in a different directory. Say /perl/assets? or /perl/css,
> etc.
> Then do something like:
>
> <Location /perl/assets>
> SetHandler default
> </Location>
>
> --
> Michael Peters
> Plus Three, LP
>
>
>
-----
With Best regards,
Dileep.
***************************************************
--
View this message in context: http://www.nabble.com/Accessing-CSS%2CJS-and-other-files-tp16703625p16722557.html
Sent from the mod_perl - General mailing list archive at Nabble.com.
Re: Accessing CSS,JS and other files
Posted by Michael Peters <mp...@plusthree.com>.
Dileep Eduri wrote:
> When I searched thru' forums, came to know abt the <Files> section, which I
> can use. But still after studying the documentation, I could not write a
> proper <Files> section.
You don't need to use a <Files> section.
> PerlModule ModPerl::Registry
> <Location /perl>
> SetHandler perl-script
> PerlHandler ModPerl::Registry
> Options ExecCGI
> allow from all
> PerlSendHeader On
> </Location>
One way is to simply not put the files under /perl :) If you have to do that,
then put them in a different directory. Say /perl/assets? or /perl/css, etc.
Then do something like:
<Location /perl/assets>
SetHandler default
</Location>
--
Michael Peters
Plus Three, LP