lucy24 - 9:24 am on Jun 15, 2013 (gmt 0)
Non-existent pages or URLs return a blank page with AllTeamz text on the screen. No idea why but below is what curl returns. The page does not exist and I would prefer that it redirect to e404.php
No, you wouldn't. Really. You would prefer that it return a 404 response accompanied by showing the content of e404.php (which, incidentally, really ought to be a static html page for safety's sake).
But this is not an htaccess issue; it's a php issue. So make your developer fix it. The server has done its job by handing off all requests to index.php. As far as it's concerned, all requests are 200. It's up to the php to do its own research, send out the correct responses and display the appropriate page-- which might be the error page.
The second issue is related to Campaign analytics from MailChimp which creates a URL something like this...
which I thought would automagically redirect to http://www.example.com/profile_builder
Uhm. It can't redirect to that, because it's already there. Did you mean that the whole enormous long horrible query string should simply be thrown away? Then where does its information go?
RewriteRule ^(sitemaps|images|upload|css|js|_tmp|facebox|cron|captcha|phpMyAdmin|ajax_upload|server-status) - [L]
RewriteRule ^(BingSiteAuth.xml|robots.txt|favicon.ico|sitemap.php|sitemap.xml|logout.php|login.php) - [L]
RewriteRule ^.*$ index.php
Hm, nice variation on the usual !-d and !-f. All requests for pages should be sent to index.php while other requests-- and some selected pages-- pass on through. But what is index.php supposed to do about all those requests? I don't see any query string in there, so how does the page know what to do?
In any case I think it would be less chaotic if you sorted by extension:
RewriteRule \.(css|jpg|txt|gif) - [L]
listing all non-page extensions you actually use. Even list html if you've got static pages that aren't involved in the php business. And then the second batch goes
RewriteRule ^(sitemap|log(out|in))\.php - [L]
et cetera, listing any php pages that exist in their own right.