Jump to content

REDIRECT_URL vs REQUEST_URI


themistral

Recommended Posts

Hi guys,

 

I'm having a strange problem.

I'm working on somebody else's website and they track every page that is visited for their own records, using their own script.

Fine. The script currently uses $_SERVER['REDIRECT_URL'] and records everything fine.

 

Each page is dynamically generated so the pages do not physically exist on the server.

 

The problem comes with a custom 404 page.

Currently, the htaccess is set to redirect back to the homepage if the page is not found.

 

I have setup a custom 404 page and changed the htaccess file to reflect that, and even when the website is showing a valid page, the tracker records it as the custom 404 page.

 

I tried changing the tracking script to use $_SERVER['REQUEST_URI'] but the same is still happening.

 

Can anyone shed any light on why a page might be showing correctly to the user, but the webserver thinks the request is generating a 404 error?

 

Thanks  :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.