diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2020-02-29 22:08:30 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2020-02-29 22:08:30 +0100 |
| commit | d3cdabcac7feb8c62451ac12a22256c0eff16873 (patch) | |
| tree | 4a81723834ed307b0397d95602844b0c4d3ee1ba /src/phinde/Fetcher.php | |
| parent | 8512ec548a4f8896aa37678f44de5b88a5a85b24 (diff) | |
| download | phinde-d3cdabcac7feb8c62451ac12a22256c0eff16873.tar.gz phinde-d3cdabcac7feb8c62451ac12a22256c0eff16873.zip | |
Add URL rewrites/replacements
Diffstat (limited to 'src/phinde/Fetcher.php')
| -rw-r--r-- | src/phinde/Fetcher.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/phinde/Fetcher.php b/src/phinde/Fetcher.php index dccb118..7cf11b7 100644 --- a/src/phinde/Fetcher.php +++ b/src/phinde/Fetcher.php @@ -15,12 +15,15 @@ class Fetcher */ public function fetch($url, $actions, $force = false) { + $url = Helper::rewriteUrl($url); + $esDoc = $this->es->get($url); if (isset($esDoc->status->location) && $esDoc->status->location != '' ) { //TODO: what if location redirects change? $url = $esDoc->status->location; + $url = Helper::rewriteUrl($url); $esDoc = $this->es->get($url); } @@ -53,6 +56,7 @@ class Fetcher } $effUrl = Helper::removeAnchor($res->getEffectiveUrl()); + $effUrl = Helper::rewriteUrl($effUrl); if ($effUrl != $url) { $this->storeRedirect($url, $effUrl); $url = $effUrl; |
