[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: Directory manipulations
From: Jonathan Vanasco <modperl-list () 2xlp ! com>
Date: 2006-11-20 19:47:49
Message-ID: 8E324459-FB6E-49CA-9AFE-94F0213ADDB3 () 2xlp ! com
[Download RAW message or body]
personally, here's what i do:
I have a handler for my site ( or my.site.com/userreg ) .
everything goes to it.
all it does it this:
instantiate a 'user' ( or ctx )
instantiate a 'page' with the ctx (user)
the page then cleans the url, and then maps the cleaned url onto a
page content class or default if nothing appropriate is found.
on your situation, you could probably just use mod_rewrite before mp
gets the urls, and just regex stuff
Something like this:
RewriteEngine On
RewriteRule ^/user/([a-z0-9]{4,16})(\/[.]*)?$ /user/index.php?&%
{QUERY_STRING}&fmo_mode=user&fmo_user=$1 [T=application/x-httpd-php,L]
( yes, i'm running a subdomain of php stuff. i needed to support
openid, and the protocol caused too much blocking on apache under
mod_perl . )
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - -
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic