[pmwiki-users] Relaxing htaccess in cookbook dir

V.Krishn vkrishn4 at gmail.com
Mon Apr 8 08:41:18 CDT 2013


On Monday, April 08, 2013 06:15:15 PM you wrote:
> On Mon, Apr 08, 2013 at 12:38:35PM +0530, V.Krishn wrote:
> > The default pmwiki/cookbook/.htaccess has following:
> > 
> > Order Deny,Allow
> > Deny from all
> > 
> > Will this be useful/better if it were:
> > 
> > Options All -Indexes
> > <IfModule mod_rewrite.c>
> > RewriteEngine On
> > RewriteRule !\.(js|ico|gif|jpg|jpeg|png|svg|svgz|swf|flv|css)$ index.html
> > [L] # index.html or a 404
> > </IfModule>
> 
> No.  The theory is that external users should never be able to access
> the files in cookbook/ directly.  Publicly accessible files belong in
> a pub/ directory.

hmm...
Now planning to update my modules to adhere to
http://www.pmwiki.org/wiki/Cookbook/ModuleGuidelines :-)

> 
> > ---
> > Following this
> > http://pmichaud.com/pipermail/pmwiki-users/2005-March/011805.html
> > 
> > Is there a way to know from cookbook via variable or method if they're
> > farm- based or field-based ?
> 
> Cookbook recipes have evolved quite a bit since 2005... I suspect
> one of our recipe authors has a good answer to this question.

Found one:

SDV($WSPlusUrl, 
  (substr(__FILE__, 0, strlen($FarmD)) == $FarmD) 
  ?  '$FarmPubDirUrl/wsplus' : '$PubDirUrl/wsplus');

-- 
Regards.
V.Krishn



More information about the pmwiki-users mailing list