Hi there,
I’ve just launched a new Campaign Monitor template for a client of mine and when clicking links from within the newsletter the Google Analytics query strings are being appended to the string as expected.
Unexpectedly however my site won’t load it’s homepage, instead it loads the 404 template.
My EE build is 2.1.3 with MSM (2 sites).
Here is the URL that should load: http://example.com/site1/ (and http://example.com/site2/ ยป MSM)
The URL causing the 404 is this:
<a href="http://example.com/site1/?utm_medium=email&utm_campaign=Template+Preview&utm_content=Template+Preview+CID_0167b39f3d7c8c91dc4f50e175068f71&utm_source=Demand++Email+marketing+by+Supply&utm_term=Check+out+the+Resort">http://example.com/site1/?utm_medium=email&utm_campaign=Template+Preview&utm_content=Template+Preview+CID_0167b39f3d7c8c91dc4f50e175068f71&utm_source=Demand++Email+marketing+by+Supply&utm_term=Check+out+the+Resort</a>
The template that is being loaded for the http://example.com/site1/ URL is at “/site1/content/index/” (site/tmplgrp/file).
I have read through a bunch of forum posts but cannot figure out how to place the correct htaccess redirect methods and apply it to the MSM sites.
My current htaccess redirects are these:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Remove www.
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# Append trailing /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ /$1/ [R=301,L]
# never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# rewrite everything else to index.php
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
Lastly, following things read around the forum, I have tried adding this block to the mod rewrite block but this didn’t help either:
RewriteCond %{QUERY_STRING} ^utm_source
RewriteCond %{REQUEST_URI} ^/site1/$ [NC]
RewriteRule (.*) /index.php?/site1/content/index/&%{QUERY_STRING} [L]
Any help would be much appreciated.
Thanks,
Jannis