[pmwiki-users] I need a little help with lower-case clean URLs
languefrancaise at gmail.com
Thu Nov 17 14:17:58 CST 2011
Maybe try this one : http://www.pmwiki.org/wiki/Cookbook/CaseCorrection ?
It looks like it does what you are looking for : "CaseCorrection
handles mistakes of case in PmWiki addresses (eg. homepage instead of
HomePage) by looking for a case-insensitive match in all of a wiki's
pages. If a match is found, the user is silently redirected to it."
2011/11/17 <redisthecat at lavabit.com>:
> Hi, Gilles.
> Thank you for the answer, but this method seems to imply in deep changes
> to my wiki, such as completely replacing the default namescheme and
> Markup. Actually, I am looking for a superficial solution for visitors
> coming up, sharing my URLs and guessing page addresses by typing directly
> on the address bar without getting 404 errors related to upper cases, and
> at the same time not imposing any rule changes to my current wiki users
> accostumed to the PmWiki.
> I'm looking for a minimalistic solution, and figured that just by changing
> the .htaccess file would be better to solve the particularities I'm
> looking for. But I don't quite know how to work with .htaccess files. I
> tried some examples on the Clean URLs solutions on PmWiki.org, but I found
> the explanations quite confusing - even on the Talk pages and Archives.
> I actually think that all I need is to just make some little adjustments
> on the line: "RewriteRule ^([A-Z0-9\xa0-\xff].*)$ pmwiki.php?n=$1
> [QSA,L]", but I have no idea what exactly to change there...
> Anyway, thanks for the help.
> Summing up, what I want is: that when someone types an address directly on
> the browser's address bar, it wouldn't make any difference if the visitor
> typed it using upper case (Main/HomePage) or not (main/homepage): they
> would access the exact same page. It would be just perfect (though
> optional) if the wiki would automatically redirect/replace the upper case
> address by the lower case, making it compliant to the largerly practised
> lowercase URLs. I am going to implement Disqus comments (disqus.com, as
> well as other third party services), which actually looks for the page
> address in order to create the comments box, and I'm not sure if it will
> mess everything by creating diferrent comment boxes for pages using
> lowercase AND uppercase addresses.
> Sorry for my English, and again, thanks in advance for any help
>> You may want to write your own $MakePageNamePatterns ;
>> should help you.
>> Excerpt :
>> Beware, if you do NOT uppercase the first letter of your pagenames,
>> the wiki will stop recognizing them as files, and you will need to
>> alter the variables:
>> $GroupPattern = '[\\w]*(?:-\\w+)*';
>> $NamePattern = '[\\w]*(?:-\\w+)*';
>> 2011/11/17 <redisthecat at lavabit.com>:
>>> Hi. Does anybody know how can I get clean URLs in lower-case, like
>>> "http://mysite.com/main/homepage" instead of
>>> "http://mysite.com/Main/Homepage" ? Here's my .htaccess file:
>>> # Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
>>> RewriteEngine On
>>> # Define the rewrite base.
>>> RewriteBase /sites/rodrigomolinaro
>>> # Send requests without parameters to pmwiki.php.
>>> RewriteRule ^$ pmwiki.php [L]
>>> # Send requests for index.php to pmwiki.php.
>>> RewriteRule ^index\.php$ pmwiki.php [L]
>>> # Send requests to pmwiki.php, appending the query string part.
>>> RewriteRule ^([A-Z0-9\xa0-\xff].*)$ pmwiki.php?n=$1 [QSA,L]
>>> Thank you for any help!
>>> pmwiki-users mailing list
>>> pmwiki-users at pmichaud.com
>> | A | de la langue française
>> | B | http://www.languefrancaise.net/
>> | C | languefrancaise at gmail.com
>> Find wellsfargomortgage Online Get Started Now.
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
More information about the pmwiki-users