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.

A Problem regarding URL's

August 27, 2008 11:24pm

Subscribe [5]
  • #1 / Aug 27, 2008 11:24pm

    hereward

    91 posts

    I manage the following site:

    http://carsguide.news.com.au

    We have changed the index.php to “site”, and updated .htaccess etc ... and this all works fine.

    Here is a typical URL:
    http://carsguide.news.com.au/site/motoring-news/story/lexus_joins_super_league/

    This works fine too.

    However, we have a problem with referrer generated URL’s, which typically have the following structure:

    http://carsguide.news.com.au/?referrercode

    where “referrercode” is an SEO/SEM referrer tracking code. This is important to us.

    The problem is: these pages are being treated by EE as “404 page not found” error, following the rules that we have created for 404 errors.

    This is not good.

    A quick check on many different non EE portal sites can demonstrate that this is not the typical behaviour.

    So, we need to know

    1) is EE aware of this issue?
    2) Is there a fix?

    thanks!
    (: Hereward

  • #2 / Aug 28, 2008 1:15am

    Greg Aker

    6022 posts

    hereward:

    I’d venture to say that this is probably due to your .htaccess rewrites & the way you have treated 404 errors within ExpressionEngine, and not ExpressionEngine behavior.  In the ExpressionEngine affiliate program, the affiliate URLs have the query string with referrer=yourreferralcode.

    Can you re-think the way you are treating the 404 templates, maybe possibly post the way you are calling them?

    Regards,

    -greg

  • #3 / Aug 28, 2008 1:20am

    hereward

    91 posts

    We are not doing anything special. there are no re-writes. this is standard out-of-the-box behaviour

  • #4 / Aug 28, 2008 1:27am

    Greg Aker

    6022 posts

    Hereward:

    OK, so how are you setting up the 404s?  If I append a ?foobar to url’s of some sites I have done (in EE), I get 200 codes returned.  There must be something in there, and I’d love to try to help you out! 😊

    Regards,

    -greg

  • #5 / Aug 28, 2008 3:00am

    hereward

    91 posts

    OK I welcome you to have a look at
    http://carsguide.news.com.au/?foobar

    if you check the header status it says 404….

    obviously there is no template group called foobar, so i assume that this is out-of-the-box functionality , ie. EE thinks that this is really a bad URL…

    The global templates 404 page is the site index page - this has been done consciously in order to avoid disaster - if I change this to a “proper” 404 page all our refferer links will break and i will probably be fired.

    (: thanks for your assistance.

  • #6 / Aug 28, 2008 3:12am

    Matt Weinberg

    489 posts

    FYI, that page shows as status 200 for me:

    $ curl --head <a href="http://carsguide.news.com.au/?foobar">http://carsguide.news.com.au/?foobar</a>
    HTTP/1.1 200 OK
    Server: Apache/2.2.3 (Red Hat)
    Last-Modified: Sun, 22 Jun 2008 10:33:00 GMT
    ETag: "2489c5-24-4503ed9da4f00"
    Content-Type: text/html; charset=UTF-8
    Date: Thu, 28 Aug 2008 06:11:38 GMT
    Connection: keep-alive
  • #7 / Aug 28, 2008 3:27am

    hereward

    91 posts

    Correction:
    I get a 200 on the first page load and a 404 on all subsquent page refreshes.

  • #8 / Aug 28, 2008 4:08am

    hereward

    91 posts

    Update:

    Using the Web Developer Plugin I get a 404 error status the FIRST time I access the page.

    (last time I was using firebug)

    Via: 1.1 NWNSHSISA03, 1.1 NWNSHSISA02
    Connection: Keep-Alive
    Proxy-Connection: Keep-Alive
    Transfer-Encoding: chunked
    Expires: Thu, 28 Aug 2008 07:04:22 GMT
    Date: Thu, 28 Aug 2008 07:04:22 GMT
    Content-Type: text/html; charset=UTF-8
    Server: Apache/2.2.3 (Red Hat)
    X-Powered-By: PHP/5.1.6
    Pragma: no-cache
    Vary: Accept-Encoding
    Cache-Control: no-cache, no-store, must-revalidate, post-check=0, pre-check=0

    404 Not Found

    If anyone reading wants to test this I suggest putting some random text after the question mark - as we are using AKAMAI caching which this may affect the result.

  • #9 / Aug 28, 2008 6:05pm

    Ingmar

    29245 posts

    However, we have a problem with referrer generated URL’s, which typically have the following structure:

    http://carsguide.news.com.au/?referrercode

    where “referrercode” is an SEO/SEM referrer tracking code. This is important to us.

    How is this code generated? Where does it come from? Also, what version and build are you using?

  • #10 / Aug 28, 2008 8:26pm

    hereward

    91 posts

    The URLs are generated by Google - they appear in the search reseults listing. The referrer code is read on the home page by javascript.

    We recently upgraded to the latest version of EE - 1.64. Not sure which build.

    cheers
    Hereward

  • #11 / Sep 10, 2008 6:14pm

    Ingmar

    29245 posts

    I just checked the link above, and the site loads fine for me. Of course, if that is your 404 page I could not tell. So, trying to reproduce this error. Can you provide a link that, in your opinion, should work, but does not? My money’s still on the rewriting issue Greg mentioned.

  • #12 / Sep 10, 2008 8:22pm

    hereward

    91 posts

    The page loads because we have set the home page as the default 404 page.

    If I were to change that default page then you would see the problem. I am not allowed to do that however as this is a live commerical site.

    As I mentioned above, I have seen 404 headers in the page.

    cheers

  • #13 / Sep 11, 2008 1:18pm

    Lisa Wess

    20502 posts

    What method are yo using to remove index.php?  Does it work if you temporarily disable that removal?

    For testing - you need a way to test; since this is a live site, you might be best reproducing this installation at a development location, preferably on the same server (so it’s the same environment), where testing won’t impact your site’s visitors.

  • #14 / Sep 11, 2008 8:18pm

    hereward

    91 posts

    yep we have a dev server, and the same thing occurs. we have renamed the index.php to “site” and use .htaccess to allow php exection of that file.

  • #15 / Sep 11, 2008 9:03pm

    Sue Crocker

    26054 posts

    hereward, what happens if you don’t use site for the index.php file, and just use the .htaccess file to do away with that?

    Is that an option for you?

    Just trying to think outside the box for a bit.

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

ExpressionEngine News!

#eecms, #events, #releases