[pmwiki-users] Clean URLs - how to make them even shorter?

Matt Simpson matthew at undertheoak.net
Sat Feb 5 17:15:27 CST 2005


Thank you again for the past help on this.  Here's the next question...

How do I do I create a clean URL down to the root for a field of a wiki
farm, assuming that the field has http://wikifielddomain.com, with field.php
installed within /pmwiki on that domain.

I tried a number of things be don't seem to get it right.  I confirmed that
I do allow options override using .htaccess config.

----- Original Message ----- 
From: "Patrick R. Michaud" <pmichaud at pobox.com>
To: "Matt Simpson" <matthew at undertheoak.net>
Cc: <Pmwiki-users at pmichaud.com>
Sent: Sunday, January 30, 2005 12:41 PM
Subject: Re: [pmwiki-users] Clean URLs - how to make them even shorter?


> On Sun, Jan 30, 2005 at 12:31:05PM -0500, Matt Simpson wrote:
> > Patrick, thank you!
> > One quick question... If I move to the root, as you show me below, will
I
> > loose access to other paths branching off of root... e.g.
> > http://mydomain.net/mywonderfulphotos ,
> > http://mydomain.net/otherphpprogram/
>
> Yes, you'll lose access to any paths that begin with an uppercase letter,
> because Apache will think they're page/group names and send them to
pmwiki. :-)
> But there's probably ways to ways to configure mod_rewrite to handle
> this case as well, if we know the path names involved.
>
> Pm
>
>
> > ----- Original Message ----- 
> > From: "Patrick R. Michaud" <pmichaud at pobox.com>
> > To: "Matt Simpson" <matthew at undertheoak.net>
> > Cc: <Pmwiki-users at pmichaud.com>
> > Sent: Sunday, January 30, 2005 12:23 PM
> > Subject: Re: [pmwiki-users] Clean URLs - how to make them even shorter?
> >
> >
> > > On Sun, Jan 30, 2005 at 12:01:42PM -0500, Matt Simpson wrote:
> > > > In the http://www.pmwiki.org/wiki/Cookbook/CleanUrls example,
> > > > how would one eliminate the /pmwiki/ or modify the /pmwiki/
> > > > within the URL to show something else?
> > > >
> > > > In my case, the example matches perfectly up to this point.
> > > > I create an .htaccess with this content...
> > > >
> > > > RewriteEngine on
> > > > RewriteRule ^([A-Z].*) /pmwiki/pmwiki.php?n=$1 [L,qsappend]
> > > > RewriteRule ^$ /pmwiki/pmwiki.php [L,qsappend]
> > >
> > > Just move your .htaccess file up one level to the directory that
> > > corresponds to your url "root".  Then urls like
> > >
> > >     http://undertheoak.net/Main/HomePage
> > >
> > > will be correctly forwarded to /pmwiki/pmwiki.php?n=Main/HomePage
> > >
> > > You'll still want to have variable settings in your config.php:
> > >
> > > ## for clean URL
> > >   $EnablePathInfo = 1;
> > >   $ScriptUrl = 'http://undertheoak.net';
> > >   $PubDirUrl = 'http://undertheoak.net/pmwiki/pub/';
> > >   $UploadUrlFmt = 'http://undertheoak.net/pmwiki/uploads';
> > >
> > > ----
> > >
> > > If you're wanting to preserve the 'wiki/Main/HomePage' syntax, you
> > > can either use aliases as before, or just rename the pmwiki/
subdirectory
> > > to wiki/ and update the RewriteRules and variables to use 'wiki'
instead
> > > of 'pmwiki':
> > >
> > > ## wiki/.htaccess
> > > RewriteEngine on
> > > RewriteRule ^([A-Z].*) /wiki/pmwiki.php?n=$1 [L,qsappend]
> > > RewriteRule ^$ /wiki/pmwiki.php [L,qsappend]
> > >
> > > ## for clean URL
> > >   $EnablePathInfo = 1;
> > >   $ScriptUrl = 'http://undertheoak.net/wiki';
> > >   $PubDirUrl = 'http://undertheoak.net/wiki/pub/';
> > >   $UploadUrlFmt = 'http://undertheoak.net/wiki/uploads';
> > >
> > > Pm
> >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://pmichaud.com/mailman/listinfo/pmwiki-users




More information about the pmwiki-users mailing list