@@ -91,24 +91,24 @@ function unity_internal_link_checker__convert_absolute_link(&$body_text, $origin
91
91
function unity_internal_link_checker__urls_to_replace(): string {
92
92
// Get the host name of the site and remove the domain extension.
93
93
$host = \Drupal::request()->getHost();
94
- if (preg_match('/\S*?\.(uk|com|net|eu)/', $host, $matches)) {
94
+ if (preg_match('/\S*?\.(gov. uk|org.uk|co.uk| com|net|eu|org )/', $host, $matches)) {
95
95
$host = $matches[0];
96
96
}
97
- else {
98
- if (preg_match('/\S*?\.(org)/', $host, $matches)) {
99
- $host = $matches[0];
100
- }
101
- }
102
97
// Strip 'www' from hostname.
103
98
$host = str_replace('www.', '', $host);
104
99
// List all domain protocols and extensions for our platform and local environments.
105
100
$protocols = ['http://', 'http://www.', 'https://', 'https://www.'];
106
101
$extensions = [
107
102
'.lndo.site/',
103
+ '/',
104
+ // Unity 1 platform environments.
108
105
'.d8un-edge-xerfxyi-6tlkpwbr6tndk.uk-1.platformsh.site/',
109
106
'.d8un-uat-qhl74ni-6tlkpwbr6tndk.uk-1.platformsh.site/',
110
107
'.main-bvxea6i-6tlkpwbr6tndk.uk-1.platformsh.site/',
111
- '/',
108
+ // Unity 2 platform environments.
109
+ '.development-q5nzhaa-kamkoebtv74zm.uk-1.platformsh.site/',
110
+ '.edge-uhfrady-kamkoebtv74zm.uk-1.platformsh.site/',
111
+ '.uat-nvcvooy-kamkoebtv74zm.uk-1.platformsh.site/',
112
112
];
113
113
$urls_to_replace = '';
114
114
// Loop through and add all protocols and extensions to the current site.
0 commit comments