[pmwiki-users] CleanURLs

Sameer Kumar skumar at eharch.com
Mon Aug 13 23:26:20 CDT 2007


It is surely Apache 2.x. It is the latest release as of 4 weeks ago.
I would be willing to provide any other info that you need if you could please help me troubleshoot this.

thanks.


-----Original Message-----
From: pmwiki-users-bounces at pmichaud.com on behalf of Eric Bohlman
Sent: Mon 8/13/2007 5:07 AM
To: pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] CleanURLs
 
"Sameer Kumar" <skumar at eharch.com> wrote in
news:94410484A515964193D7A45931A8F056C70979 at MAIL2006.eharch.com: 

> I am struggling with getting the CleanURLs to work correctly on my
> site. I have tried my best to follow the recipe but am unable to get
> the ?nout of the URL. 
> 
>  
> 
> Details: 
> 
> Running PmWiki 2.2.0 Beta63 on Apache on Windows XP.(site running as
> an intranet, no public access).

If that's Apache 1.x, your problem is that Apache on Windows normalizes 
everything to lowercase really early on in the process, so mod_rewrite 
never gets to see uppercase names, which is what the cookbook rule relies 
on. That took me several hours to figure out a few weeks ago. What I 
wound up doing was changing the last rule to:

# Send everything else to pmwiki.php, appending the query string part.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /pmwiki/pmwiki.php?n=$1 [NC,QSA,L]

The RewriteCond prevents requests for files (pictures, stylesheets, etc.) 
from being translated. The RewriteRule matches essentially everything 
else and passes it to PmWiki. The one problem is that all the names will 
have been lowercased, so pages without a (:title:) won't have Wiki-spaced 
titles (e.g. /HomePage will get translated to /pmwiki/pmwiki.php?
n=homepage which will display as "Homepage" rather than "Home Page"). In 
my case this was just a local mirror of a live site hosted on a Linux 
server, so it didn't matter much, but for an Intranet it might be a 
nuisance.

AFAIK, Apache 2.x doesn't have this problem.


_______________________________________________
pmwiki-users mailing list
pmwiki-users at pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users




More information about the pmwiki-users mailing list