[Last Call] Learn how to a build a cloud-first strategyRegister Now


Getting Apache Log to see anchor links #link as it does ?link

Posted on 2006-05-21
Medium Priority
Last Modified: 2010-03-04
We would like to somehow setup Apache log so that it records the fully address in the address bar, so we can tell when users are using our anchor links (which use #link-location).

The IT department has told us that this is impossible, but I like to believe its possible as it does add to the address bar and many cases on our site it also changes the page as we anchor link into pages from other pages.

So page A would have a link to page B with like PAGE-B.com/page.htm#middle-of-the-page and now we want Apache to be able to see that the users landed on PAGE-B.com/page.htm#middle-of-the-page and and know that its different then the user that went straight to PAGE-B.com/page.htm

IT department has said we can use ?and-some-value, but we don't like this option as we want to use the already implemented anchor links on the site as we have millions of pages and links and updating to a new system isn't possible, better to invest in updating Apache to work with the current structure.

Hope you can help our team out, big thanks to Experts like you!
Question by:ApacheHelp
1 Comment
LVL 10

Accepted Solution

sleep_furiously earned 500 total points
ID: 16737239
Unfortunately your IT department is correct.

The part of the URL after '#' is called the fragment.  Browsers don't even send the fragment to the server.  The browser strips the fragment off before sending the request, and when the server returns the page the browser uses the fragment to position the page in the window.  And when the fragment links to an anchor on the same page, no request is even sent to the server at all.

Apache can not log this information because it never receives this information.  To force the fragment to be sent, you would have to replace the browsers of all your site visitors--in most cases this will not be practical.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Loops Section Overview
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month17 days, 16 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question