ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

404 generated when Google tracking URL used

March 13, 2012 10:48pm

Subscribe [2]
  • #1 / Mar 13, 2012 10:48pm

    msunickb

    19 posts

    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

  • #2 / Mar 14, 2012 5:27pm

    Shane Eckert

    7174 posts

    Hello msunickb,

    I am sorry to hear you are running into this problem.

    Are you still having this issue? I am able to visit the page without any problems.

    I do not see anything wrong with the .htaccess file, but we do not really support using it. Any problems that arise with ExpressionEngine and .htaccess, we typically ask that it be removed while we troubleshoot. This is a very customized .htaccess.

    I can move this over to the Community Help Forum if you would like. More eyes on this post might help.

    Let me know!

    Cheers,

  • #3 / Mar 15, 2012 12:55pm

    msunickb

    19 posts

    Hey Shane, thanks for the response. I am still having the issue. If you visit http://www.hexarmor.com/?test=query you’ll see that although the homepage loads the jQuery rotator doesn’t work. That is because technically what you’re looking at is the 404 page. The homepage is set as the 404 template (not my decision) so it looks as though there is nothing wrong.

    If you think it would help to move it to the community help forum go ahead and move it.

    I appreciate the assistance.

    Nick

  • #4 / Mar 16, 2012 4:03pm

    Shane Eckert

    7174 posts

    Hey msunickb,

    Would you mind taking the .htaccess out of the way to test?

    Are you using any Add-Ons like Structure to change the way URL’s are handled?

    I can still move this over, but I thought I would check on these two things.

    Let me know!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases