|
Cookbook /
OpenUrlsSummary: Automatically create URL Path for use with EnablePathInfo.
Version: 1.0
Maintainer: BenWilson
Categories: WikiFarms, PageNaming
QuestionI don't want to type the URL path to the script for every field I have in my wiki farm. How do I create Clean Urls automatically? AnswerOpen Urls is a take off of the name for OpenBSD and OpenSSH, neither of which are open. The purpose of this script is to automatically create a clean url for You will need the following in your .htaccess, with an appropriate configuration in Apache: RewriteRule ^([A-Z].*) index.php?n=$1 [L,qsappend] RewriteRule ^$ index.php [L,qsappend] or RewriteRule ^([A-Z].*) pmwiki.php?n=$1 [L,qsappend] RewriteRule ^$ pmwiki.php [L,qsappend] Providing the root directory for the wiki has no capital letters then the above mentioned redirect will behave as Pmwiki does. Notes
Releases
CommentsWorking on pmwiki-2.1.3: Well, I couldn't use the default configuration for mod_rewrite, I don't know why it doesn't worked. So, here it's what I did: First, created an .htaccess file and uploaded it to my default wiki directory. This wasn't my root server dir. <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^([A-Z].*) pmwiki.php?n=$1 [L,qsappend] RewriteRule ^$ pmwiki.php [L,qsappend] </IfModule> Then, edited this part on the config.php file in my /pmwiki/local/ directory. Replace the . with your actual server.
Last, edited the openurl-0.1.php to allow the rewrite, and that was it! I wrote this because there weren't clear instructions on how to do this, so I had to guess. Good luck! Stahn(03-23-06) See AlsoContributors
Categories: Administration Ben Wilson Maintained
User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |