PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   Exclude files by pattern (http://www.phpdig.net/forum/showthread.php?t=2224)

[Pi] 11-02-2005 05:58 PM

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

[Pi] 11-02-2005 06:07 PM

Hmm.

Now that I think about it, I could mess with FORBIDDEN_EXTENSIONS.

Code:

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 thread for another example.


All times are GMT -8. The time now is 03:37 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.