Hello,

I run a couple web sites that use mod_perl to generate every page.  The 
site is working well, but the CGI syntax of the links I use (e.g. pages 
looking like "http://host/myscript.pl?name=value&session=foo") has some 
drawbacks.

My understanding is that search engines tend to not follow such links.  So, 
my web sites have little coverage by search engines, which is too bad 
because there's lots of good content behind those CGI links.

There would also be the added benefit of supporting some old links to flat 
html pages that I've since moved into the mod_perl script.

There are probably a number of ways to solve this problem, and if you can 
think of a better way to do this, let me know.  I'd like to avoid 
pre-generating pages though as my content is fairly dynamic.

What I'd like to do now, is have my site (when in [session-less] 
guest-mode; how search engines would see it) use URLs that don't have the 
&'s and ?'s in them, and instead have paths that look more normal (e.g. 
"/users/bill.html" instead of "/myscript.pl?user=bill").

If I can change a request for /users/bill.html into a call to my mod_perl 
script with extra path_info of ("/users/bill.html"), my script could 
examine the path_info and figure out that it should load the "user=bill" page.

I figure this is an Apache config file issue, but given that I'm using 
mod_perl, that config may be trickier.

I've been reading the docs for mod_rewrite, but frankly I'm confused.  I'm 
not sure this is the right direction to go in either.

I'm using very basic mod_perl now, just Apache::Registry.  But, I'm very 
happy with the performance boost it has given me.

Have any of you done this sort of thing?

Here's my VirtualHost snippet from the httpd.conf file (in case that matters):
<VirtualHost ugtz.com>
DocumentRoot /home/ugtz/html
ServerName ugtz.com
DirectoryIndex /perl/ugtz.pl
Alias /perl/ /home/ugtz/perl/
<Location /perl>
   SetHandler     perl-script
   PerlHandler    Apache::Registry
   PerlSendHeader On
   Options        +ExecCGI
</Location>
</VirtualHost>

Any help would be appreciated, feel free to just point me elsewhere if this 
isn't appropriate on the modperl mailing list (I'm new to the list).

Bill Marrs



Reply via email to