[pmwiki-users] CleanURLs problem in apache 2.2
JBT
jultus at gmail.com
Thu Jun 18 11:36:15 CDT 2009
Using the latest pmwiki stable release on a linux
Debian Lenny server running the latest apache2.
>From http://www.pmwiki.org/wiki/Cookbook/CleanUrls
I'd like the shortest cleanest option, which is
"Example Three: .htaccess in the Site's Document Root"
The site is: http://wikisite.nl/pm/pmwiki.php?n=Main.HomePage
and I prefer: http://wikisite.nl/Main/HomePage
I have full access rights to the server's config,
so I don't use .htaccess but site config directly
(i.e. /etc/apache2/sites-available/wikisite.cf)
because this is faster for apache2.
So, this is in my /w/wiki/pm/local/config.php:
<?php if (!defined('PmWiki')) exit();
$EnablePathInfo = 1;
$ScriptUrl = "http://wikisite.nl";
$PubDirUrl = 'http://wikisite.nl/pm/pub';
$Skin = 'triad';
and this is the complete wikisite.cf for apache2.2,
using the Rewrite options as mentioned in the CookBook:
<VirtualHost *:80>
ServerName wikisite.nl
DocumentRoot /w/wiki
DirectoryIndex index.php index.html index.htm
Options Indexes FollowSymLinks ExecCGI Includes MultiViews
Checkspelling Off
RewriteEngine on
RewriteCond %{HTTP_HOST} !^wikisite.nl?$
RewriteRule ^/(.*) http://wikisite.nl/$1 [L,R]
<Directory "/w/wiki">
RewriteBase /
RewriteRule ^$ pm/pmwiki.php [L]
RewriteRule ^index\.php$ pm/pmwiki.php [L]
RewriteRule ^([A-Z0-9\xa0-\xff].*)$ pm/pmwiki.php?n=$1 [QSA,L]
</Directory>
</VirtualHost>
Unfortunately, this yields all kinds of wrong;
First, opening http://wikisite.nl/ in a browser
shows me the Open Fancy-indexed Apache folder containing /pm/
where pmwiki is under. When I click on that it shows me
all the pmwiki folders plus the README and pmwiki.php.
Of course this can be prevented placing an index.php
there or disabling fancy-indexing, but I prefer not to.
Since the rewrite rule is there, it shouldn't even try
and open a non-existing index.php thus leave the
fancyindexing by apache out, while it does not
seem to do anything with the index.php requests.
(What's wrong there?)
Then, secondly, when I click on /pm/pmwiki.php in
my browser it opens the Pmwiki Homepage, but then
all links on the page yield a not found error.
For example;
The linked "documentation index" points to:
http://wikisite.nl/PmWiki/DocumentationIndex
and results in a 404 Not Found error.
As do all other links available on the page.
I don't think not using htaccess has anything to do with it.
Plus, I have other websites on the server that are
running just fine, using the same apache and php5,
several blog-engines and the likes.
I've been trying to get a cleanurl going for hours now,
read loads of info available about cleanurls, but none
seem to work or apply, so I end up asking here.
Is there anyone out there using cleanurls on apache2.2
with a debian (or derivative) apache config setup ?
Thanks in advance,
Julius
More information about the pmwiki-users
mailing list