perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@neondawn.net
Subject rewrite urls to modperl handler
Date Sun, 02 Nov 2008 19:18:25 GMT
Hi all,

I am new to mod_perl and am having a difficult time with rewrites.
Either I am doing it the most wrong way, or it's so easy that I'm over
looking it. I have searched and found nothing that seems to relate to
what I want.

I am working on a perl based wiki, to help me learn more about how perl
works. I am looking for a way to create friendly URLs that get passed to a
mod_perl handler, without having the handler location name in the url.


For instance currently I have:
http://example.com/ex_perl_h/docName

and I want:
http://example.com/docName



>From my apache config:

PerlModule ExamplePackage::WC
<Location /ex_perl_h>
        SetHandler perl-script
        PerlResponseHandler ExamplePackage::WC
</Location>




I have mod rewrite setup to redirect request that don't an existing
file or directory to the perl handler.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*) /ex_perl_h [L]
</IfModule>

but this doesn't work. 



I think what I am looking for is a mod_perl based front controler that
would handle ALL site request for URLs that don't point to a real file
or directory.

So for http://example.com/docName docName would be passed somehow to the
mod_perl script ExamplePackage::WC , similar to
http:://example.com/wc.pl?arg=docName , but done in the mod_per style.

Thanks.

Uk1ah Smith




Mime
View raw message