[Pmwiki-users] Question regarding setup of webserver. (CORRECTED)

Patrick R. Michaud pmichaud
Wed Aug 20 10:37:50 CDT 2003


Correction:

I forgot the caret in my AliasMatch line -- it should read

    AliasMatch ^/([A-Z].*) /file/path/to/pmwiki.php/$1

This also appears to fix the problem with 404 not found urls I
mentioned below.

Pm


On Wed, Aug 20, 2003 at 10:20:18AM -0600, Patrick R. Michaud wrote:
> Actually, you don't even need mod_rewrite--you can simply place the following
> in the apache configuration file:
> 
>    Alias / /file/path/to/pmwiki.php/
> 
> and urls of the form  http://server/Main/HomePage  will work.
> Note that Apache 2.0 installations still need to set "AcceptPathInfo On"
> in order for this to work.
> 
> As Carlo mentioned, the downside to this approach is that every url
> is treated as a PmWiki page.  In particular, there's no way to access
> other files (e.g., uploads) at the same server hostname, because 
> http://server/uploads/Group/file.ext will be sent to PmWiki.
> 
> However, I just thought of something:  Perhaps one can take advantage of
> the fact that WikiGroup names always begin with a capital letter,
> and therefore only alias the urls that start with a capital letter.  
> Thus placing
> 
>    AliasMatch /([A-Z].*) /file/path/to/pmwiki.php/$1
> 
> in the httpd configuration will cause all urls of the form 
> http://server/Group/PageName to be sent to PmWiki because of the 
> capital 'G', while other urls not beginning with a capital letter 
> (e.g., http://server/uploads/... and http://server/~username) would 
> continue to be treated normally.
> 
> I just tried this on my local system and it worked, but there's a
> bizarre side-effect that urls for non-existent resources (404 Not Found
> errors) get passed to PmWiki as requests for "HTTP_NOT_FOUND.html.var".
> 
> Also note that the Alias and AliasMatch directives in Apache only work 
> in the server and virtual host configuration files--i.e., not in 
> .htaccess files.  I'll see if I can come up with a mod_rewrite equivalent
> (mod_rewrite does work in per-directory .htaccess files).
> 
> Pm
> 
> 
> On Wed, Aug 20, 2003 at 05:45:21PM +0200, Christian Ridderstr?m wrote:
> > On Wed, 20 Aug 2003, Carlo Strozzi wrote:
> > 
> > > For such things (and if you are using Apache) you need to set-up the
> > > mod_rewrite rules appropriately. Have a look at the Apache documentation for
> > > details.
> > >
> > Thanks, I've passed this info along to the guy with access to the 
> > webserver.
> > 
> > > > Do any of you know if this is possible to achieve? I've looked at about 20 
> > > > PmWiki-sites, and haven't found this to work anywhere.
> > > 
> > > Probably because they do not run just PmWiki but also other applications,
> > > so having every URL rewritten to trigger PmWiki would not be appropriate.
> > > 
> > Maybe.. or they simply didn't know how. Hopefully they'll read this and 
> > know then.
> > 
> > > > But it should be possible, a MoinMoin-site (http://wiki.dotgnu.org/), has 
> > > > this working fine.
> > > 
> > > Yes, but note that "wiki" in the host name, which probably means that
> > > the relevant web server is dedicated to running a wiki.
> > 
> > That's fine in this case (wiki.lyx.org v.s. www.lyx.org).
> > 
> > /Christian
> > 
> > -- 
> > Christian Ridderstr?m, +46-8-768 39 44		http://www.md.kth.se/~chr
> > 
> > 
> > _______________________________________________
> > Pmwiki-users mailing list
> > Pmwiki-users at pmichaud.com
> > http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
> 
> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com



More information about the pmwiki-users mailing list