Welcome! Log In Create A New Profile


Относительный http_referer в error_log

Posted by kanin 
Относительный http_referer в error_log
March 23, 2012 09:58AM
Можно ли как-нибудь записывать относительные пути $http_referer, вместо полного URL, в случае если $host = $http_referer ?

т.е вместо:

log_format main '$remote_addr - $remote_user [$time_local] $status "$request" $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"'; - - [23/Mar/2012:17:24:01 +0400] "GET /page2.html HTTP/1.1" 200 4208 "http://localhost/page1.html" "Mozilla/5.0 (Windows NT 6.1; WOW64)"

писать так: - - [23/Mar/2012:17:24:01 +0400] "GET /page2.html HTTP/1.1" 200 4208 "/page1.html" "Mozilla/5.0 (Windows NT 6.1; WOW64)"
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 69
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready