Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "isomorphic-packages/sitemap-crawler/src/utils/mapUrlToRootUrl"

Index

Variables

Functions

Variables

Const REGEXP_URL_PATH

REGEXP_URL_PATH: RegExp = /.+?:\/\/.+?(\/.+?)(?:#|\?(.*)|$)/

Functions

mapUrlToRootUrl

  • mapUrlToRootUrl(rootUrl: string, receivedUrl: string, query?: string): string | false
  • Get path of (sitemap) URL as we do not rely on the received host.

    • site got cloned with WP Duplicator -> wrong host in robots.txt if not yet flushed
    • General > Settings is configured with http but site is served with https

    Parameters

    • rootUrl: string
    • receivedUrl: string
    • Default value query: string = ""

    Returns string | false

Generated using TypeDoc