From: Tara S. <te...@cl...> - 2001-11-11 21:22:06
|
I see you (who?) did it for http://phpwiki.sourceforge.net/wiki/ - page=20 urls look like: http://phpwiki.sourceforge.net/wiki/PageName How did you do it? with mod_rewrite or somewhere inside the php? Thanks for any info (thanks to to all of you for your patience with my=20 tons of emails) ;) Tara --=20 Je r=E9ponds au mieux de mes connaissances Climb to the Stars! - http://climbtothestars.org/ no tables: http://climbtothestars.org/coding/tableless/ Pompeurs Associ=E9s - http://pompage.net/ |
From: Jeff D. <da...@da...> - 2001-11-12 03:37:56
|
On Sun, 11 Nov 2001 22:18:25 +0100 "Tara Star" <te...@cl...> wrote: > I see you (who?) did it for http://phpwiki.sourceforge.net/wiki/ - page > urls look like: http://phpwiki.sourceforge.net/wiki/PageName Here's how it's done on the sourceforge site: Phpwiki is installed in htdocs/phpwiki-1.3/. So the wiki is available the "normal" way through http://phpwiki.sf.net/phpwiki-1.3/index.php. Then: 1. htdocs/phpwiki-1.3/index.php is copied to htdocs/wiki 2. Tell apache that htdocs/wiki is really a php script. As long as apache is configured to allow you to do this, (and you have a fairly recent apache) this is done by putting the following into htdocs/.htaccess: <Files wiki> SetHandler application/x-httpd-php </Files> 3. htdocs/wiki is edited as follows: a. Set include path so that the rest of the phpwiki code can be found. Something like: ini_set('include_path', 'phpwiki-1.3'); b. Set DATA_PATH so that URLs to images and css get generated correctly. define('DATA_PATH', '/phpwiki-1.3'); That's it! There are many ways to get this to work. Study the comments in index.php for some more hints. Also if you do this kind of funnyness you're much more likely to uncover arcane bugs, snakes and spiders. |
From: Tara S. <te...@cl...> - 2001-11-12 19:31:01
|
Jeff Dairiki wrote: > On Sun, 11 Nov 2001 22:18:25 +0100 > "Tara Star" <te...@cl...> wrote: >=20 >=20 >>I see you (who?) did it for http://phpwiki.sourceforge.net/wiki/ - page= =20 >>urls look like: http://phpwiki.sourceforge.net/wiki/PageName [snip] >=20 > Also if you do this kind of funnyness you're much more likely to uncove= r > arcane bugs, snakes and spiders. >=20 you know I love those, don't you? ;) Tara --=20 Je r=E9ponds au mieux de mes connaissances Climb to the Stars! - http://climbtothestars.org/ SpiroLattic - http://climbtothestars.org/spirolattic/ Pompeurs Associ=E9s - http://pompage.net/ |
From: Tara S. <te...@cl...> - 2001-11-12 21:07:32
|
Jeff Dairiki wrote: > On Sun, 11 Nov 2001 22:18:25 +0100 > "Tara Star" <te...@cl...> wrote: >=20 >=20 >>I see you (who?) did it for http://phpwiki.sourceforge.net/wiki/ - page= =20 >>urls look like: http://phpwiki.sourceforge.net/wiki/PageName >> >=20 > Here's how it's done on the sourceforge site: [snip] >=20 > That's it! There are many ways to get this to work. Study the comment= s > in index.php for some more hints. >=20 > Also if you do this kind of funnyness you're much more likely to uncove= r > arcane bugs, snakes and spiders. *arms herself with Raid(TM) for dealing with the avalanche of=20 six-to-eight-legged beings which is likely to show up* Now, let's consider another (soon-to-be-real-life) case. The wiki files=20 are in /public_html/spirolattic/. <thinking class=3D"aloud"> Let's say I create /thing/ (same level as /public_html/) and set that as=20 the root directory for the domain spirolattic.net. I create a file=20 called "wiki" as directed above, in the directory /thing/ =3D> /thing/wik= i. a) is there any way I can make the script "wiki" access the WikiFiles=20 which are in /public_html/spirolattic/ (mapped as another domain name)? b) if it was possible (I suspect it isn't, though), then I could access=20 the wiki by spirolattic.net/wiki/ =3D> b1) could I tell my server that "wiki" is the default file to look=20 for in a directory (not "index.php"), so that the "wiki/" part=20 disappears in the uri? (again, I don't think it is possible, as it isn't=20 when the default file is "index.php") </thinking> Ok, in fact I just want to be sure I'm right in thinking these things=20 aren't possible. As I see it (considering I don't want to move my WikiFiles), I'll have=20 to make the new domain point to a directory on the same level as the=20 current wiki directory, and then do some nasty mod_rewrite so that pages=20 can be accessed as http://spirolattic.net/RecentChanges - for example. Does anybody see any other solutions to this? Thanks :) Tara --=20 Je r=E9ponds au mieux de mes connaissances Climb to the Stars! - http://climbtothestars.org/ SpiroLattic - http://climbtothestars.org/spiro/ Pompeurs Associ=E9s - http://pompage.net/ |
From: Jeff D. <da...@da...> - 2001-11-13 00:40:40
|
On Mon, 12 Nov 2001 22:03:39 +0100 "Tara Star" <te...@cl...> wrote: > a) is there any way I can make the script "wiki" access the WikiFiles > which are in /public_html/spirolattic/ (mapped as another domain name)? (If I understand the question correctly:) Sure. You can put phpwikis all over the place --- they can even be on different physical hosts. As long as each one is configured to talk to the same database (same mysql server/database, or same dbm files) they will all have the same contents. > b) if it was possible (I suspect it isn't, though), then I could access > the wiki by spirolattic.net/wiki/ Certainly possible. > => b1) could I tell my server that "wiki" is the default file to look > for in a directory (not "index.php"), so that the "wiki/" part > disappears in the uri? (again, I don't think it is possible, as it isn't > when the default file is "index.php") You want e.g. the RecentChanges to be at http://spirolattic.net/RecentChanges, I think. You can do this, I think, but not, I think (again), in quite the way you suggest. You could do it, I'm sure, with mod_rewrite (since you can do just about anything with mod_rewrite). It's also probably possible to do this using Apache's 'Handler' directive. There's some cryptic notes I made on this at http://phpwiki.sf.net/wiki/PageNamesInPathInfo. The reason most people would not want to do this is that if you do, the wiki occupies the entire URL name space of your domain. If you ever want to add something else (other than wiki) under that domain, you're out of luck, since every URL points to a wiki page. |
From: Jeff D. <da...@da...> - 2001-11-15 15:04:54
|
On Wed, 14 Nov 2001 11:58:38 -0700 "Aredridel" <are...@nb...> wrote: > > You want e.g. the RecentChanges to be at > > http://spirolattic.net/RecentChanges, > > I think. > > > > You can do this, I think, but not, I think (again), in quite the way you > > suggest. You could do it, I'm sure, with mod_rewrite (since you can do > > just about anything with mod_rewrite). It's also probably possible > > to do this using Apache's 'Handler' directive. There's some cryptic > > notes I made on this at http://phpwiki.sf.net/wiki/PageNamesInPathInfo. > > I'm not sure how well Handler works -- I tried this a while ago with less > than success. I'm not sure what's required. Sorry. Yes, the note to which you are replying was written in a drunken stupor. I meant to say "Apache's 'Action' directive". Along with 'SetHandler' this can be used to cause apache to pass all requests for files in a particular directory to a CGI script. I'm still, however, not comletely sure as to how one would go about accomplishing the orignally proposed task, even armed with this tool... > > The reason most people would not want to do this is that if you do, > > the wiki occupies the entire URL name space of your domain. If you ever > > want to add something else (other than wiki) under that domain, you're > > out of luck, since every URL points to a wiki page. > > Unless you use mod_alias, which most people have compiled in, or > mod_rewrite, or many oter modules, or you could write special support for > other URIs in the wiki php scripts. My point, in case it wasn't clear, was that when USE_PATH_INFO is true, and if the wiki were instaled as proposed: http://a.b.c/HomePage is the home page of the wiki. http://a.b.c/foo is another page in the wiki http://a.b.c/cgi-bin/script.cgi is another (wierdly named) page in the wiki. http://a.b.c/icons/rarrow.gif ditto. Sure, you could use mod_alias to make it so that /cgi-bin/script.cgi and /icons/rarrow.gif are not treated as wiki pages, but then wiki pages by those names are inaccessible (at least without further tricks.) Functionally, this may not be a huge problem. Who cares if you can't make a wiki-page named icons/rarrow.gif? But it's messy enough, that it makes putting the wiki at http://a.b.c/wiki/HomePage look like the better alternative to me. |