Router-Talk

Summary: Talk page for Router.
Maintainer: MagicBeanDip?
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

I changed this recipe a bit and will upload my version of it. CarlosAB June 19, 2017, at 07:08 PM

route-cb.zipΔ
md5sum:fd9004135fc9e3d53e4f275c469f4142
sha256:bc0dfd7c71be36838170ea1f7f926f65230ed243ed37752288e29a6fb681d2f9

For more information see Announcement.


In order to make the (original) recipe work in the CamelCaseToLowerCase mode with mod-rewrite based clean URLs, under non-siteroot base URL (i.e. www.example.com/~username/wiki/some-group/some-page), I needed to modify parts of the .htaccess as follows:

# Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
RewriteEngine On
# Define the rewrite base.
RewriteBase /~username/wiki
# CHANGED: Send requests without parameters to pmwiki.php main page
RewriteRule ^$           pmwiki.php?n=main/home  [QSA,L]
# Send requests for index.php to pmwiki.php.
RewriteRule ^index\.php$ pmwiki.php  [L]
# ADDED: Protect pmwiki-internal directories from being processed
RewriteRule ^((cookbook|docs|local|pub|scripts)\/.*)	$1	[L]
# Send requests to pmwiki.php, appending the query string part. 
# CHANGED: Work with "router" recipe CamelCaseToLowerCase:
RewriteRule ^([A-Za-z0-9\xa0-\xff].*\/[A-Za-z0-9\xa0-\xff].*)$ pmwiki.php?n=$1   [QSA,L]
# (original, not working with "router" recipe CamelCaseToLowerCase mode: RewriteRule ^([A-Z0-9\xa0-\xff].*)$ pmwiki.php?n=$1  [QSA,L])

The ^$ rule needs modifying if the $DefaultPage is set to something else than Home in local config.

-- PremekBrada, 3rd Oct 2019

Talk page for the Router recipe (users?).