[pmwiki-users] Clean URLS cookbook question

H. Fox haganfox at users.sourceforge.net
Mon Feb 6 11:40:24 CST 2006


On 2/6/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Sun, Feb 05, 2006 at 03:41:55PM -0700, H. Fox wrote:
> > After working for a few hours on  that page, I think maybe it should
> > be called something like "ShorterUrls" because 'getting rid of
> > "pmwiki.php?n="' is not all people are trying to do.
> >
> > It turns out there are three shorter-URL issues:
> >
> > a) Getting rid of "pmwiki.php"
> > b) Turning ?n=Foo.Bar into /Foo/Bar
> > c) Calling PmWiki from a "higher" directory, perhaps even the server's
> > document root.
> >
> > All three make the URL shorter but only (b) "cleans" the URLs.
> >
> > Some servers may not give the wiki administrator control over
> > mod_rewrite or (especially) mod_alias.  Virtually all servers support
> > (b) and (c).
>
> Alas, in my experience there are a significant number of Apache
> installations that don't support (b), or won't allow the wiki
> administrator to use /Foo/Bar without using mod_rewrite.

By this do you mean using the mod_alias+httpd.conf method doesn't
imply $EnablePathInfo can be turned on?

> This is part of the reason why 2.0 switched $EnablePathInfo to be
> disabled by default.

That makes sense.

Here's the wording of the current draft of the CleanUrls page:

   Shortening your URLs can be separated into three issues:

      1. Turning, for example, ?n=Main.HomePage into /Main/HomePage .
      2. Removing the "pmwiki.php" part.
      3. Removing portions of the path, even all the way up to the
       server's document root.

   This page offers three approaches to URL-shortening. The first two
   approaches address all three issues on an Apache server. The third
   approach is for any server, addressing issue #2 and issue #3 without
   requiring any extra server configuration.

> (Another reason for the switch is that it's even *more* difficult
> to use $EnablePathInfo on IIS-based servers than it is on Apache,
> but that's really outside of the scope of this discussion. :-)

I was wondering what to do about instructions for IIS + $EnablePathInfo...

Hagan




More information about the pmwiki-users mailing list