Can I have the LinkValidator scheduled task to only validate internal links?

Vote:
 

Hi!

Our intranet does not an internet connection so validating external links is useless. Is there a way using the LinkValidatorOptions to the task only validating internal links and skipping all externals?

Thanks!

/Kristoffer

#295266
Jan 24, 2023 13:20
Vote:
 

Can you add something to the settings config for linkValidation within excludePatterns

See here for a little more detail : The horrors of the Episerver Link Validation Job - Tomas Hensrud Gulla 

CMS11 Documentation : Link validation (optimizely.com)

CMS12 Config: Cms section (optimizely.com) 

#295272
Edited, Jan 24, 2023 14:25
Vote:
 

I came here to post a link to my blog post, and say this can be achieved using the exclude pattern – but Minesh is way faster than me! 😆

Try this pattern to exclude all links starting with http:// or https:// – i.e. all external links.

^http(s)?:\/\/.*
#295283
Edited, Jan 24, 2023 21:02
Vote:
 

Thanks! Is this the correct json?

"EpiServer": {
    "Cms": { 
      "LinkValidatorOptions": {
        "ExcludePatterns": [ "^http(s)?:\/\/.*" ]
      }
    }

Seems to try to validate external links anyway.

Also, I see that there is a lot of old links in the report, how can I clear the report?

/Kristoffer

#295373
Edited, Jan 26, 2023 16:20
Vote:
 

The above is the corect json and the job works as exceptected.

/Kristoffer

#295434
Edited, Jan 27, 2023 9:42
Minesh Shah (Netcel) - Jan 27, 2023 9:43
Nice, great you got it to work :)
Vote:
 

To clear the report, you may (at your own risk) update the database directly.

UPDATE tblContentSoftlink SET LastCheckedDate = NULL, FirstDateBroken = NULL, HttpStatusCode = NULL, LinkStatus = NULL
#295436
Jan 27, 2023 10:40
Vote:
 

Thanks Tomas, I just found that and it works perfect.

#295437
Jan 27, 2023 10:44
Tomas Hensrud Gulla - Jan 27, 2023 10:47
Nice!
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.