Forum Moderators: phranque
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
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
curl -I http://www.example.com/buster_open
HTTP/1.1 200 OK
Date: Sat, 15 Jun 2013 06:00:25 GMT
Server: Apache/2.2.22 (Ubuntu)
X-Powered-By: PHP/5.3.10-1ubuntu3.6
Set-Cookie: PHPSESSID=111bj3vei3q6fcu3jadj2slb20; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8
http://www.example.com/profile_builder?utm_source=Coach+Email+List&utm_campaign=4617df9768-Baby_come_back_to_Coaches6_14_2013&utm_medium=email&utm_term=0_a50708424b-4617df9768-[LIST_EMAIL_ID] http://www.example.com/profile_builder [edited by: phranque at 12:08 pm (utc) on Jun 15, 2013]
[edit reason] Please Use Example.com [webmasterworld.com] [/edit]
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
The second issue is related to Campaign analytics from MailChimp which creates a URL something like this...
http://www.example.com/profile_builder?utm_source=Coach+Email+List&utm_campaign=4617df9768-Baby_come_back_to_Coaches6_14_2013&utm_medium=email&utm_term=0_a50708424b-4617df9768-[LIST_EMAIL_ID]
which I thought would automagically redirect to http://www.example.com/profile_builder
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