bianster,
Okay, I'm NOT sure what your question is
so let me go through your code (some of it really makes NO sense at all!
)
[INDENT]RewriteEngine on[/INCENT]
Should be RewriteEngine On but that's probably of no effect.
RewriteRule ^public/wiki/(.*)$ /wiki/$1%{QUERY_STRING} [L]
Will take requests from public/wiki/whatever and send it to wiki/whatever BUT the way to attach the previous query string is with the QSA flag (your way may actually work, though!).
RewriteRule ^(cp|public)/(.*)$ $1.php/$2 [L][/CODE]
Will then take EVERYTHING from the cp and public directories and send it to the EVERYTHING subdirectory of the cp.php or public.php script. Why not the Last flag on this one, too?
Code:
RewriteEngine On
RewriteRule ^public/wiki/([a-z0-9.-]*)$ wiki/$1 [L]
Should take care of your "what's supposed to happen" (I
HATE
that EVERYTHING atom so this will just look for lowercase letters, digits, dots and hyphens - add anything else you're permit inside the square brackets). If you need the previous query string, change the [L] to [QSA,L].
The other .htaccess file is something else! 
Code:
<IfModule mod_rewrite.c>
RewriteEngine on # okay
RewriteCond %{REQUEST_FILENAME} -d # doesn't seem to be needed
RewriteRule ^(.*/[^\./]*[^/])$ $1/ # all that to add a trailing slash?
RewriteRule ^(robots\.txt)$ robots.txt [L] # redundant - should cause a loop!
RewriteRule ^(favicon\.ico)$ favicon.ico [L] # ditto
RewriteRule ^(.*)$ wakka.php?wakka=$1 [QSA,L] # This WILL cause a loop
</IfModule>
I'd suggest changing the first line to RewriteEngine Off then specifying what you want to do in this directory before you add RewriteRules (add them after RewriteEngine On but BEFORE RewriteEngine Off).
I can see why that wiki .htaccess was "giving (you) a bad case of the heebee jeebees!" It did to me, too!
When you're going to write regex, it's a good approach to identify the pattern of the URL you need to change then what you want to change it to. The pattern should NOT be EVERYTHING (wakka.php redirected to wakka.php) so learn to specify and use RewriteCond(itions) to remove special cases (like wakka.php) before your RewriteRule.
Regards,
DK
Bookmarks