Menu

#1 Do not separate stats for index pages

open
nobody
None
5
2006-05-11
2006-05-11
Terry
No

I noticed that http://mysite/index.html was getting
separate statistics from http://mysite/

This certainly isn't desirable (to me, anyway), so I
fixed it as follows:
#existing code in inc.php:
$array = parse_url($LocalPage);
$local_domain = strtolower($array["host"]);
$local_page = $LocalPage;

#new code:
$searchPattern = array('/\/index.htm$/',
'/\/index.html$/');
$local_page = preg_replace($searchPattern,
array('\/','\/'), $local_page);

I think index.php can be treated as a default page name
too, so that might be worth adding.

Anyway, up to you if you want to use it.

Cheers,
Terry

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.