Bug #14419
closedLog writes wrong paths
0%
Description
This bug was reported by user Foxpower in #0000526. I paste his comment below:
Semms, that Windows (XP) is now writing Logs, many thanks for that.
But: do the log contents look like expected? Have a look:
192.168.1.24 - - [23/Nov/2004:11:16:35 +0000] "GET /ageri.de/Referenzen--413.html HTTP/1.1" 200 8824 "http://k7/Kanzleimarketing.416.0.html" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
"GET /ageri.de/Referenzen--413.html" ist not right, the called url was "http://k7/Referenzen.413.0.html" (k7 is my local testdomain, ageri.de the page title of the root page).
Typo3 should use the domain record ("k7") instead of the page title. And: what about the hyphens in the url ("Referenzen--413.html")?
Another thing I expected was a apache compatible log: where are the GETs of e.g. images or scripts? Is it intended, that the log only includes page requests?
(issue imported from #M552)
Updated by Karsten Dambekalns over 19 years ago
Does this error only occur on Windows machines? Or on Linux, too?
Updated by Karsten Dambekalns over 19 years ago
1. It is intended that only page hits are logged. In fact TYPO3 doesn't know of any images, flash files, stylesheets, ... ever being requested. Those are served directly by Apache. If you want to have a full log including readable URLs, check realURL and have Apache log everything as usual.
2. The hyphens are nothing wrong, that's the way the logged URL looks like this if not configured differently: "[path][title]--[uid].html". This can be changed with config.stat_apache_pagenames, see TSref.
-> This leaves only the question about the use of the actual requested domain vs. the root page title.
Updated by Karsten Dambekalns over 19 years ago
Line 1608 in in class.t3lib_fe.php determines the root path by using t3lib_pageSelect->getPathFromRootline() which in turn just uses the current rootline value. So obviously this works as expected, and in fact is the same way Apache would log: This is the path, this has nothing to do with the host.
In Apache one could/would log the virtual host name additonally to the log file. Maybe this is something that should be added, but the current behaviour isn't a bug IMHO.
Rather a misunderstanding caused by the fact that pages can behave like virtual hosts when a domain record is added.
Updated by Michael Stucki over 19 years ago
Yes I agree it seems intended.
However I still don't like the way in which the path is logged. OK it is easily readable, but the logged "files" do not exist at all!
I suggest to add a new option to log the originally requested URL instead of the compiled path string.
However the feature won't make it into 3.8...
Updated by Michael Stucki about 19 years ago
Can be adjusted by setting
config.stat_apache_pagenames = /path_to_mysite/[title].[uid].[type].html
[type] does not work in TYPO3 < 4.0, so you need to hardcode its value...