[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Webalizer problem...Still
- Subject: Re: [cobalt-users] Webalizer problem...Still
- From: "Paul Mullett" <paul.mullett@xxxxxxxxxxxxxxxxxx>
- Date: Thu Nov 8 00:57:03 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> > Hiya,
> > Ok well this is a high simplification, and its not clean, but it should
> > work.
> > If you simply change the filename that gets rewritten to htold or
similar,
> > then whatever the webalizer does it wont really affect access, plus you
can
> > put in custom .htaccess files, its messy, but doing a global
search/replace
> > inside a file is easier than trying to change the coding to write out
> > different contents etc.
> > Of course if you did do this you'd need to manually remove the .htaccess
> > files because the webalizer wouldn't know about them after the filename
> > change.
> >
> > Just a thought....
> >
> I was about to write back and say that won't work, then I thought about it
> and I did what you suggested, which was I figured out, was to change in
the
> webalizer.pl the following lines:
>
> # Create a .htaccess1 if it isn't there yet
>
> if (!-e '$thepath/.htaccess1')
> {
> my $string =
> "#Access file\norder allow,deny\nallow from all\nrequire group
> $name\nAuthname WebStats\nAuthtype Basic\nAuthAuthoritative off\n";
> open HTACCESS, qq(>$thepath/.htaccess1);
> print HTACCESS $string;
> close HTACCESS;
> chmod 0744, qq($thepath/.htaccess1);
>
> Instead of .htaccess I changed it to .htaccess1, so now webalizer.pl
writes
> to .htaccess1 instead of .htaccess.
>
> Now, I can upload my own .htaccess file for my clients, if they so choose
> and not have to worry about it being overwritten.
>
> BTW: htold wouldn't work.
>
> Thanks for the infusion of a new idea.
>
> aky
Hello all,
There is another solution, simply change one line in the .pl file.
Change: if (!-e '$thepath/.htaccess1')
To: if (!-e "$thepath/.htaccess1")
Simply replace the single quotes with double quotes, then webalizer checks
for the file properly, and wont over write any existing .htaccess file.
Paul