Search squid archive

Of redirect_program, perl, DBs and URLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

	I'm trying to implement a redirect_program in perl. Its
a fairly simple program. I'm trying to find a spot when a user
is accessing a directory or site, and if they aren't in the
"already showed file", generate a 302 to a page of my choice.

	For the URL, I'm checking for just /\/$/ , but have
run into some pages that use "/" to pass info to a banner
ad site so it gets lost. Is there a better check I should
be using? Maybe more along the lines of /[com|net|org|edu]\// 
perhaps? 

	The next is that when the process writes it to an NDBM
file, its not flushed or sync'd or something. So I'm using DB_File .
It has sync, and it seems to work well within the process, but if
I run an outside program to delete the entry so the user sees the
row again, even if I sync, it seems the perl doesn't see it.
Has anyone gotten around this? (Short of moving to MySQL)

		Thanks, Tuc

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux