View Full Version : Exclude files by pattern
I have a directory tree which contains blah_nn.html and blah_nn_1.html, where blah_nn_1.html are the "Printable" versions of blah_nn.html. Can phpDig be configured to exclude files matching /blah_\d+_1\.html/i when spidering?
Thanks,
Pi
Hmm.
Now that I think about it, I could mess with FORBIDDEN_EXTENSIONS.
define('FORBIDDEN_EXTENSIONS','(\d+_1\.html)|\.(rm|ico|cab|swf|css|gz|z|tar |zip|tgz|msi|arj|zoo|rar|r[0-9]+|exe|bin|pkg|rpm|deb|bz2)$');
Is that reasonable?
Charter
11-02-2005, 07:11 PM
Yes, very reasonable. Try [0-9]+ though as eregi is used. See this (http://www.phpdig.net/forum/showthread.php?t=1684) thread for another example.
vBulletin® v3.7.3, Copyright ©2000-2025, Jelsoft Enterprises Ltd.