I need the experts! 😊
A client of mine recently had their host (Lunarpages) update their Apache version and since then we’ve noticed that the campaign URL generated from Google is generating a 404 error. It’s a little misleading as the 404 is just the homepage but we noticed that the URL shows up as invalid in Google and the jQuery slider we’re using doesn’t work when this page is displayed.
The homepage is http://www.hexarmor.com and a sample URL you can use to see the resulting 404 is http://www.hexarmor.com/?utm_source=google&utm_medium=cpc&utm;_term={keyword}&utm_campaign=branding.
I have read through different threads and wiki entries and done quite a bit of searching the web but can’t come up with anything that will fix the issue.
The one thing I thought had it squashed was changing qtype to 1 instead of 0, which did fix the homepage and allowed Google to recognize the URL but it also had the unwanted side-affect of having every URL on the site point to the home page…oops. 😊
So that’s where I’m at. URL’s with query strings are generating a 404 error.
By the way, I am using the include method and LG .htaccess Generator to remove index.php and we’re running EE 1.7.1.
=== htaccess file ===
RewriteEngine On
RewriteBase /
# Redirect non www pages to www
#———————————————
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{http_host}/$1 [R=301,L]
# Add a trailing slash to paths without an extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [L,R=301]
# Remove index.php
# Uses the “include method”
# http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 ^({ee:template_groups}|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Fix queries for actions, urls and css in EE
RewriteCond %{QUERY_STRING} ^(ACT=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(URL=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(CSS=.*)$ [NC]
RewriteRule ^(.*)$ /index.php\?&%{QUERY_STRING} [L]
Thanks in advance to anyone that can help. I’m at a loss.
Nick