LinkCrawler Rule example - REWRITE
REWRITE rules can be used to do the following tasks:
Simple example - modify URL to be able to download it:
Let's say you got this URL which is broken:
http://cdn8.appwork.org/speed.zip/thisPartIsNotNeeded.html
JD will not pickup this URL and/or it will get displayed as offline.
The correct URL would be:
http://cdn8.appwork.org/speed.zip
The following rule will fix this:
[
{
"enabled": true,
"name": "example rule for type REWRITE",
"pattern": "(https?://cdn8\\.appwork\\.org/speed.zip)/thisPartIsNotNeeded\\.html",
"rule": "REWRITE",
"rewriteReplaceWith": "$1"
}
]