[pmwiki-users] [Repost] Problem with $enablepathinfo

Petko Yotov 5ko at free.fr
Thu Aug 30 01:17:09 CDT 2007


On Thursday 30 August 2007, Martin Kerz wrote:
> Hi there,
>
> unfortunately last time no one could help me out here. Is this the
> wrong mailing list for these kind of questions?
>
> I have a severe problem with the enablepathinfo variable running 2.1
> beta 63.
>
> When I switch it on, the wiki group gets added to $SkinDirUrl and all
> paths of pictures and uploads. Links work fine, though.
>
> e.g. The correct path for an image on my site would be:
>
> http://server.com/uploads/Group/logo.png
>
> When I switch on $enablepathinfo=1, the link pmwiki generates in the
> source code changes to:
>
> http://server.com/Group/uploads/Group/logo.png
>
> It adds the group name in the path right before "/uploads".
> The picture won't be shown with this wrong path.
>
> I want to $enablepathinfo=1, because I would like to use the CleanURL
> recipe.
>
> The (Apache) server has mod_rewrite enabled, although I cannot change
> rewriting rules using .htacces files. Nevertheless, the administrator
> enabled the rewriting rules (from the recipe) in the configuration
> himself. Could there be some problem with the rewriting rule, or is
> it a problem with my cofiguration?

Hi Martin.

While I cannot judge about the different possible configurations at the 
Cookbook page, here is what I use on http://galleries.accent-bg.com/Thumblist 
and a number of other hosted sites:


1. In .htaccess (or inside the httpd.conf file for the website root 
directory):

	RewriteEngine On
	RewriteBase /
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteCond %{REQUEST_FILENAME} !-l
	RewriteRule ^([A-Z0-9\x80-\xFF].*)$       /pmwiki.php?n=$1  [QSA,L]

2. In local/config.php :

	$ScriptUrl = 'http://galleries.accent-bg.com';
	$UploadUrlFmt = "/uploads";
	$FarmPubDirUrl = $PubDirUrl = "/pub";



Also, check if you haven't changed the $UploadPrefixFmt variable. See [1]

Hope that helps.
Petko

[1] http://www.pmwiki.org/wiki/PmWiki/UploadsAdmin




More information about the pmwiki-users mailing list