I have tried many ways, but without successful result.
Target wiki access url: www.example.com/wiki/Ampersand_%26_nextampersand_%26_plus_%2B_nextplus_%2B_text
Apache internally process the %26 and %2B as & and + so we need to convert it again to url style. (as mentioned here www.mediawiki.org/wiki/Manual_talk:Short_URL/Ampersand_solution#Another_solution)
Following example handles only 1 appearance of & or +, not combined.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.*)\&(.*)$ w/index.php?title=$1\%26$2
RewriteRule ^wiki/(.*)\+(.*)$ w/index.php?title=$1\%2B$2
RewriteRule ^wiki/(.*)$ /w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^/?wiki/*$ /w/index.php [L,QSA]
RewriteRule ^/*$ /w/index.php [L,QSA]
The question is how to get all & and + signs replaced by %26 and %2B and finally forwarded to processing index.php.
I have tried approaches like
RewriteRule ^([^+]*)\+(.*) $1%2B$2 [N] #freezes
RewriteRule ^wiki/([^+]*)\+(.*) wiki/$1%2B$2 [N] #freezes
and many others (in combinations) from following advices, but I couldn't find working solution.
Apache Mod Rewrite - Replace : character with another
mod_rewrite: replace underscores with dashes
definitely there is a solution as Wikipedia is using some successful way how to do it.
http://en.wikipedia.org/wiki/%26_Yet_%26_Yet
http://en.wikipedia.org/wiki/C%2B%2B
Any ideas? Thank you.