From 7729842792d2e1f6c2b681e314c5189f3ad82e50 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 11:36:08 -0400 Subject: [PATCH 01/56] renamed rules.json --- rules.sample.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 rules.sample.json diff --git a/rules.sample.json b/rules.sample.json deleted file mode 100644 index c06c864..0000000 --- a/rules.sample.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - "^/topsecret.*$ [F,L]", - "^/oldpath/(\\d*)/(.*)$ /newpath/$2/$1 [L]", - "!^/oldpath.*$ http://www.example.com [R=302,L,NC]", - "^/deadlink.*$ [G]", - "^/foo$ /bar [H=^baz.com$]" -] \ No newline at end of file From e0a723a6fc2e913b3be3dceecbbb2ff8abeb8f7a Mon Sep 17 00:00:00 2001 From: Naeem UL-Haq <10832647+naeemhaq@users.noreply.github.com> Date: Wed, 12 Aug 2020 14:20:24 -0400 Subject: [PATCH 02/56] Adding rules file --- rules.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 rules.json diff --git a/rules.json b/rules.json new file mode 100644 index 0000000..6461c9c --- /dev/null +++ b/rules.json @@ -0,0 +1,3 @@ +[ + "^/hosted(.*) /egs_sgu [NC]", +] \ No newline at end of file From da973a1d87991fed3f4b4df41921058b78d06307 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 14:30:13 -0400 Subject: [PATCH 03/56] typo of comma --- rules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.json b/rules.json index 6461c9c..a752b9c 100644 --- a/rules.json +++ b/rules.json @@ -1,3 +1,3 @@ [ - "^/hosted(.*) /egs_sgu [NC]", + "^/hosted(.*) /egs_sgu [NC]" ] \ No newline at end of file From 22aa8de2f577de7a58ca82b9f5988ae30a89e740 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 14:31:27 -0400 Subject: [PATCH 04/56] testing regex1 --- rules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.json b/rules.json index a752b9c..78da24b 100644 --- a/rules.json +++ b/rules.json @@ -1,3 +1,3 @@ [ - "^/hosted(.*) /egs_sgu [NC]" + "^/hosted/(.*)$ /egs_sgu/$1 [NC]" ] \ No newline at end of file From 4a005d5181f4fb1348022a5d2871d656f372c6f4 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 14:36:55 -0400 Subject: [PATCH 05/56] regextest2 --- rules.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules.json b/rules.json index 78da24b..28e5fec 100644 --- a/rules.json +++ b/rules.json @@ -1,3 +1,3 @@ [ - "^/hosted/(.*)$ /egs_sgu/$1 [NC]" + "^/hosted.*$ /egs_sgu [NC]" ] \ No newline at end of file From 1c847b2d0a98c8d994363427a171a21850e1bef3 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 14:55:22 -0400 Subject: [PATCH 06/56] renamed the file and regextext --- rules.json | 3 --- rules_.json | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 rules.json create mode 100644 rules_.json diff --git a/rules.json b/rules.json deleted file mode 100644 index 28e5fec..0000000 --- a/rules.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "^/hosted.*$ /egs_sgu [NC]" -] \ No newline at end of file diff --git a/rules_.json b/rules_.json new file mode 100644 index 0000000..d6035af --- /dev/null +++ b/rules_.json @@ -0,0 +1,3 @@ +[ + "^/hosted/rest/services/EGS_SGU.*$ /egs_sgu/rest/$1 [NC]" +] \ No newline at end of file From 6644e249d37d2ca08033620ebeb6be989c20c30c Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 15:06:38 -0400 Subject: [PATCH 07/56] regextest3 --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index d6035af..d3c5760 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/rest/services/EGS_SGU.*$ /egs_sgu/rest/$1 [NC]" + "^/hosted/rest/services/EGS_SGU.*$ /egs_sgu/rest [NC]" ] \ No newline at end of file From dde6e543c26fab6aad2e9b352fb9eecba8e6bbc0 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 15:08:51 -0400 Subject: [PATCH 08/56] regextest4 --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index d3c5760..946c905 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/rest/services/EGS_SGU.*$ /egs_sgu/rest [NC]" + "^/hosted/.*$ /egs_sgu/rest [NC]" ] \ No newline at end of file From a00c02d83590a9d7914f0b43a3c960e78a78cf2e Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 15:56:05 -0400 Subject: [PATCH 09/56] regextest4 --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 946c905..092c5ef 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/.*$ /egs_sgu/rest [NC]" + "^/hosted/*$ /egs_sgu/rest [NC]" ] \ No newline at end of file From c8e53d86576b09014bc491ce415fa9f22938bf34 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 15:56:56 -0400 Subject: [PATCH 10/56] regextest5 --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 092c5ef..6a87ddb 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/*$ /egs_sgu/rest [NC]" + "^/hosted.*$ /egs_sgu/rest [NC]" ] \ No newline at end of file From 24a31f9efbd2caa7c15dadc64b6f639316f412c6 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 15:58:17 -0400 Subject: [PATCH 11/56] regextest6 --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 6a87ddb..39ab4f0 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted.*$ /egs_sgu/rest [NC]" + "^/hosted/(.*)$ /egs_sgu/rest [NC]" ] \ No newline at end of file From c4af320efe72657d296ff5f9cc15b1c821697c01 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 15:59:11 -0400 Subject: [PATCH 12/56] regextest7 --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 39ab4f0..d3f277d 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/(.*)$ /egs_sgu/rest [NC]" + "^/hosted/(.*) /egs_sgu/rest [NC]" ] \ No newline at end of file From b9ecbd0e9c6957252791df047a02562951d5677e Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 17:09:44 -0400 Subject: [PATCH 13/56] regextest7 --- rules_.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index d3f277d..bd3856c 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,4 @@ [ - "^/hosted/(.*) /egs_sgu/rest [NC]" + "^/hosted/(.*) /rule1 [NC]", + "^/hosted/rest/services/EGS_SGU(.*) /hostmatch [H=egs\.services.*]" ] \ No newline at end of file From dad8997027f77d6d9707214295bc60258b90eb8a Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 17:15:00 -0400 Subject: [PATCH 14/56] regextest8 --- rules_.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rules_.json b/rules_.json index bd3856c..d45dd08 100644 --- a/rules_.json +++ b/rules_.json @@ -1,4 +1,3 @@ [ - "^/hosted/(.*) /rule1 [NC]", - "^/hosted/rest/services/EGS_SGU(.*) /hostmatch [H=egs\.services.*]" + "^/hosted/(.*) /rule1 [NC]" ] \ No newline at end of file From 4e561399e9874eebc84bce104f0b30c0482f73af Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 12 Aug 2020 17:18:16 -0400 Subject: [PATCH 15/56] regextest9 --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index d45dd08..3886c1c 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/(.*) /rule1 [NC]" + "^/hosted(.*) /rule1 [NC]" ] \ No newline at end of file From ad937144d13c878f4c156b097dcce1286313c0a5 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Mon, 17 Aug 2020 10:21:15 -0400 Subject: [PATCH 16/56] added packing script --- edge-rewrite.cmd | 42 ++++++++++++++++++++++++++++++++++++++++++ rules_.json | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 edge-rewrite.cmd diff --git a/edge-rewrite.cmd b/edge-rewrite.cmd new file mode 100644 index 0000000..a161d5b --- /dev/null +++ b/edge-rewrite.cmd @@ -0,0 +1,42 @@ +@echo off + +rem go to directory where cmd script is +cd %~dp0 + +rem check for 7z.exe +rem todo : allow for an environment variable that defines location of 7zip +if not exist "c:\program files\7-zip\7z.exe" goto need7zip + +rem cut up date and time to use for backup filename +set CUR_YYYY=%date:~0,4% +set CUR_MM=%date:~5,2% +set CUR_DD=%date:~8,2% +set CUR_HH=%time:~0,2% +if %CUR_HH% lss 10 (set CUR_HH=0%time:~1,1%) + +set CUR_MI=%time:~3,2% +set CUR_SS=%time:~6,2% +set CUR_MS=%time:~9,2% + +rem rename zip file for safe keeping +rename Edge-Rewrite.zip Edge-Rewrite_%CUR_YYYY%%CUR_MM%%CUR_DD%_%CUR_HH%%CUR_MI%%CUR_SS%-bak.zip +cd Edge-Rewrite +"c:\program files\7-zip\7z.exe" a -r -x!*.bak ..\Edge-Rewrite.zip * +if errorlevel 1 goto zipError + +goto end + +:need7zip +echo 7zip is either not installed or not found at c:\program files\7-zip +rem pause +goto end + +:zipError +echo. +echo ERROR zipping config file +echo See messages above +rem pause +goto end + +:end +pause diff --git a/rules_.json b/rules_.json index 3886c1c..758e630 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,36 @@ [ - "^/hosted(.*) /rule1 [NC]" -] \ No newline at end of file + "^/hosted/(.*) /rule1/$1 [NC]", + "^/hosted/rest/services/EGS_SGU(.*) /hostmatch [H=egs\\.services.*]", + + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1" +] From 746f8ea7e3c0bc9f33804d7f8e9880d0488645b1 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Mon, 17 Aug 2020 11:13:39 -0400 Subject: [PATCH 17/56] adding cloudformation template --- cloudformation.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 cloudformation.yml diff --git a/cloudformation.yml b/cloudformation.yml new file mode 100644 index 0000000..bbcbe2d --- /dev/null +++ b/cloudformation.yml @@ -0,0 +1,54 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: This CloudFormation template for deploying edge re-write lambda function. + +Parameters: + S3SourceBucket: + Type: String + Description: S3 bucket containing lambda code zip file + Default: 'aws-landing-zone-s3-shared-sse-469685743753-ca-central-1' + LambdaCodeZipFile: + Type: 'String' + Description: 'Name of the zip file of the lambda code' + Default: 'edge-rewrite-master.zip' + +Resources: + edgeRewriteRole: + Type: 'AWS::IAM::Role' + Properties: + RoleName: edge-rewrite-role + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Principal: + Service: + - lambda.amazonaws.com + - edgelambda.amazonaws.com + Action: + - 'sts:AssumeRole' + Policies: + - PolicyName: edgeRewritePolicy + PolicyDocument: + Statement: + - Effect: Allow + Action: + - 'logs:CreateLogGroup' + - 'logs:CreateLogStream' + - 'logs:PutLogEvents' + Resource: '*' + EdgeRewriteFunction: + Type: AWS::Lambda::Function + DependsOn: edgeRewriteRole + Properties: + Code: + S3Bucket: !Ref S3SourceBucket + S3Key: !Ref LambdaCodeZipFile + FunctionName : 'Edge-Rewrite' + Handler: 'handler.handler' + Role: + Fn::GetAtt: + - 'edgeRewriteRole' + - 'Arn' + Runtime: nodejs12.x + Timeout: 900 + \ No newline at end of file From 02ba92354ce2bcfa87b48f9a3a7db3906ac9d7ef Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Tue, 18 Aug 2020 07:51:36 -0400 Subject: [PATCH 18/56] updating rules --- rules_.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/rules_.json b/rules_.json index 758e630..4877d35 100644 --- a/rules_.json +++ b/rules_.json @@ -1,7 +1,4 @@ [ - "^/hosted/(.*) /rule1/$1 [NC]", - "^/hosted/rest/services/EGS_SGU(.*) /hostmatch [H=egs\\.services.*]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1", "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1", From efcbf2e40d330aa60dbd8a54aca22d11dee8a6b6 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Tue, 18 Aug 2020 09:03:52 -0400 Subject: [PATCH 19/56] Added Redirect switch to couple of rules --- rules_.json | 4 +- serverlesscftemplate.yml | 88 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 serverlesscftemplate.yml diff --git a/rules_.json b/rules_.json index 4877d35..1c0855b 100644 --- a/rules_.json +++ b/rules_.json @@ -3,7 +3,7 @@ "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1", "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1", "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [R]", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer$1", "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer/WMSServer$1", "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer/WMSServer$1", @@ -29,5 +29,5 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1" + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]" ] diff --git a/serverlesscftemplate.yml b/serverlesscftemplate.yml new file mode 100644 index 0000000..ab24301 --- /dev/null +++ b/serverlesscftemplate.yml @@ -0,0 +1,88 @@ +AWSTemplateFormatVersion: 2010-09-09 +Description: The AWS CloudFormation template for this Serverless application +Resources: + ServerlessDeploymentBucket: + Type: 'AWS::S3::Bucket' + Properties: + BucketEncryption: + ServerSideEncryptionConfiguration: + - ServerSideEncryptionByDefault: + SSEAlgorithm: AES256 + ServerlessDeploymentBucketPolicy: + Type: 'AWS::S3::BucketPolicy' + Properties: + Bucket: !Ref ServerlessDeploymentBucket + PolicyDocument: + Statement: + - Action: 's3:*' + Effect: Deny + Principal: '*' + Resource: + - !Join + - '' + - - 'arn:' + - !Ref 'AWS::Partition' + - ':s3:::' + - !Ref ServerlessDeploymentBucket + - /* + Condition: + Bool: + 'aws:SecureTransport': false + RedirectsLogGroup: + Type: 'AWS::Logs::LogGroup' + Properties: + LogGroupName: /aws/lambda/edge-rewrite-prod-redirects + RedirectsLambdaFunction: + Type: 'AWS::Lambda::Function' + Properties: + Code: + S3Bucket: !Ref ServerlessDeploymentBucket + S3Key: >- + serverless/edge-rewrite/prod/1597686890418-2020-08-17T17:54:50.418Z/redirects.zip + FunctionName: edge-rewrite-prod-redirects + Handler: _optimize/edge-rewrite-prod-redirects/handler.handler + MemorySize: 128 + Role: !GetAtt + - edgeRewriteRole0 + - Arn + Runtime: nodejs10.x + Timeout: 1 + DependsOn: + - RedirectsLogGroup + - edgeRewriteRole0 + RedirectsLambdaVersionZR48yggZG3QaSsHAr4ehhOlyd5PmZT30l87x6tpPc8: + Type: 'AWS::Lambda::Version' + DeletionPolicy: Retain + Properties: + FunctionName: !Ref RedirectsLambdaFunction + CodeSha256: hMUDG4BG8RoDD6P5uh3ItjO6xfUgg/PAZ7f0u5WxASo= + edgeRewriteRole0: + Type: 'AWS::IAM::Role' + Properties: + RoleName: edgeRewriteRole-prod + AssumeRolePolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Principal: + Service: + - lambda.amazonaws.com + - edgelambda.amazonaws.com + Action: 'sts:AssumeRole' + Policies: + - PolicyName: edgeRewriteRolePolicy-prod + PolicyDocument: + Version: 2012-10-17 + Statement: + - Effect: Allow + Action: + - 'logs:CreateLogGroup' + - 'logs:CreateLogStream' + - 'logs:PutLogEvents' + Resource: 'arn:aws:logs:us-east-1::log-group:/aws/lambda/*:*:*' +Outputs: + ServerlessDeploymentBucketName: + Value: !Ref ServerlessDeploymentBucket + RedirectsLambdaFunctionQualifiedArn: + Description: Current Lambda function version + Value: !Ref RedirectsLambdaVersionZR48yggZG3QaSsHAr4ehhOlyd5PmZT30l87x6tpPc8 From 5406b287caa07539763a797f6320dff8d1f0cb57 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Tue, 18 Aug 2020 09:11:25 -0400 Subject: [PATCH 20/56] testrule1 --- rules_.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 1c0855b..15d5bc1 100644 --- a/rules_.json +++ b/rules_.json @@ -29,5 +29,6 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]" + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]", + "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" ] From 063f5ff40e5fefb7bb16c4ceee934d06dc425171 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 09:17:54 -0400 Subject: [PATCH 21/56] simplified rules --- rules_.json | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/rules_.json b/rules_.json index 15d5bc1..1c66592 100644 --- a/rules_.json +++ b/rules_.json @@ -1,34 +1,6 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [R]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]", + "^/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services$1", + "^/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1", + "^/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" ] From bccf06b90ee4ca9b71ee366949fe42d4cb1f5904 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 09:23:08 -0400 Subject: [PATCH 22/56] Adding host url to regex matching rule --- rules_.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules_.json b/rules_.json index 1c66592..0328963 100644 --- a/rules_.json +++ b/rules_.json @@ -1,6 +1,6 @@ [ - "^/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services$1", - "^/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1", - "^/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1", + "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services$1", + "^https://maps-stage.egs-redir.services.geo.ca/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1", + "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" ] From c1c18e041e45e7533b19e0b01387ff064067d7af Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 09:26:56 -0400 Subject: [PATCH 23/56] adding Redirect switch-flag --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 0328963..4228198 100644 --- a/rules_.json +++ b/rules_.json @@ -1,5 +1,5 @@ [ - "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services$1", + "^/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services$1 [R]", "^https://maps-stage.egs-redir.services.geo.ca/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1", "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" From 03ea13e9abb054b21792d8bbf8d009dde068968b Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 09:32:21 -0400 Subject: [PATCH 24/56] Added NC switch --- rules_.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules_.json b/rules_.json index 4228198..840f4a5 100644 --- a/rules_.json +++ b/rules_.json @@ -1,6 +1,6 @@ [ "^/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services$1 [R]", - "^https://maps-stage.egs-redir.services.geo.ca/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1", - "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1", + "^https://maps-stage.egs-redir.services.geo.ca/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1 [NC]", + "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [NC]", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" ] From 87892971fad0c11db37268ce20ecd13f7f70e9f7 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 10:45:22 -0400 Subject: [PATCH 25/56] testing regex --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 840f4a5..ba83595 100644 --- a/rules_.json +++ b/rules_.json @@ -1,5 +1,5 @@ [ - "^/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services$1 [R]", + "^/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R]", "^https://maps-stage.egs-redir.services.geo.ca/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1 [NC]", "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [NC]", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" From 2e2b4350b539e91ab56747b11278a2c64953c008 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 10:50:21 -0400 Subject: [PATCH 26/56] troubleshooting trailing slash in url --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index ba83595..fa20b69 100644 --- a/rules_.json +++ b/rules_.json @@ -1,5 +1,5 @@ [ - "^/hosted/rest/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R]", + "^/hosted/rest/services/EGS_SGU(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R]", "^https://maps-stage.egs-redir.services.geo.ca/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1 [NC]", "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [NC]", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" From c5ea3414f082a32b2d58c2fd9e4356d5968c6e8c Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 11:19:05 -0400 Subject: [PATCH 27/56] added end of line switch --- rules_.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules_.json b/rules_.json index fa20b69..25acc35 100644 --- a/rules_.json +++ b/rules_.json @@ -1,6 +1,6 @@ [ - "^/hosted/rest/services/EGS_SGU(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R]", - "^https://maps-stage.egs-redir.services.geo.ca/hosted/services/EGS_SGU/(.*) https://maps-stage.services.geo.ca/egs_sgu/services/$1 [NC]", - "^https://maps-stage.egs-redir.services.geo.ca/hosted/rest/services/Hosted/(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [NC]", + "^/hosted/rest/services/EGS_SGU(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R]", + "^/hosted/services/EGS_SGU(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/$1 [NC]", + "^/hosted/rest/services/Hosted(.*)$ https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [NC]", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" ] From ada301c2e1348742d0c3f97b036a7e7f4b69c8be Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 11:20:10 -0400 Subject: [PATCH 28/56] added ignore case flag --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 25acc35..7adfd4c 100644 --- a/rules_.json +++ b/rules_.json @@ -1,5 +1,5 @@ [ - "^/hosted/rest/services/EGS_SGU(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R]", + "^/hosted/rest/services/EGS_SGU(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R,NC]", "^/hosted/services/EGS_SGU(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/$1 [NC]", "^/hosted/rest/services/Hosted(.*)$ https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [NC]", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" From 82ac066139cd5809bc7da4200addc528c219bc5e Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 11:32:11 -0400 Subject: [PATCH 29/56] back to the old rules --- rules_.json | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/rules_.json b/rules_.json index 7adfd4c..01f7d72 100644 --- a/rules_.json +++ b/rules_.json @@ -1,6 +1,34 @@ [ - "^/hosted/rest/services/EGS_SGU(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R,NC]", - "^/hosted/services/EGS_SGU(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/$1 [NC]", - "^/hosted/rest/services/Hosted(.*)$ https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer/WMSServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer/WMSServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer/WMSServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer/WMSServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer$1 [NC]", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer$1 [NC]", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer$1 [NC]", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [NC]", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" ] From 78cfd3041ab754e64fa643dbd909d7935b0a40b5 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 11:35:23 -0400 Subject: [PATCH 30/56] path rewrite test --- rules_.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 01f7d72..770ecbb 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,6 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1 [NC]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [NC]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [NC]", - "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]" + "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]", + "^/oldpath2 /newpath2" ] From a8a9ee4ba4dcb067a14ca53980bab690267d885b Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 11:38:05 -0400 Subject: [PATCH 31/56] removing digits from paths --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 770ecbb..6cf7382 100644 --- a/rules_.json +++ b/rules_.json @@ -31,5 +31,5 @@ "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [NC]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [NC]", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]", - "^/oldpath2 /newpath2" + "^/oldpath-second /newpath-second" ] From 58e336fa9d9d6f77c96389f4cc64675b9d32de43 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 11:40:17 -0400 Subject: [PATCH 32/56] added end of line --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 6cf7382..ffd5b08 100644 --- a/rules_.json +++ b/rules_.json @@ -31,5 +31,5 @@ "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [NC]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [NC]", "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]", - "^/oldpath-second /newpath-second" + "^/oldpath-second$ /newpath-second" ] From db51a859e9622e3b870c1698450e3d113666e5ee Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 11:41:13 -0400 Subject: [PATCH 33/56] added end of line --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index ffd5b08..7f87763 100644 --- a/rules_.json +++ b/rules_.json @@ -30,6 +30,6 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1 [NC]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [NC]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [NC]", - "^/oldpath http://maps-stage.services.geo.ca [R=302,NC]", + "^/oldpath$ http://maps-stage.services.geo.ca [R=302,NC]", "^/oldpath-second$ /newpath-second" ] From 736065231cf72e50065bba2dcea708df22cdff3c Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 11:50:32 -0400 Subject: [PATCH 34/56] test rules1 --- rules_.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rules_.json b/rules_.json index 7f87763..cc44c84 100644 --- a/rules_.json +++ b/rules_.json @@ -1,12 +1,12 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer/WMSServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer/WMSServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation$1 [NC]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation$1 [NC]", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer$1 [NC]", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer$1 [NC]", "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer/WMSServer$1 [NC]", From 72c1fcd0227745aa918b8d0659074de243fdf6ae Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 13:53:15 -0400 Subject: [PATCH 35/56] testing limitted set of rules --- rules_.json | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/rules_.json b/rules_.json index cc44c84..87dad71 100644 --- a/rules_.json +++ b/rules_.json @@ -1,35 +1,4 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1 [NC]", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer/WMSServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer/WMSServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer$1 [NC]", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer$1 [NC]", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer$1 [NC]", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1 [NC]", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [NC]", - "^/oldpath$ http://maps-stage.services.geo.ca [R=302,NC]", - "^/oldpath-second$ /newpath-second" + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation$1 [NC]" ] From 30cab85f237c533b0916e30945afa08b0dd7a697 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 14:02:43 -0400 Subject: [PATCH 36/56] single rule test --- rules_.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rules_.json b/rules_.json index 87dad71..07a41b4 100644 --- a/rules_.json +++ b/rules_.json @@ -1,4 +1,3 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation$1 [NC]" + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]" ] From 565c8448581cf2a1a35ef6fc683186239f581052 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 14:05:06 -0400 Subject: [PATCH 37/56] testing single rule --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 07a41b4..275d48f 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]" + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [NC]" ] From d91440dfccc22f137812c5a7e20b343ce50a0d88 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Wed, 19 Aug 2020 14:49:09 -0400 Subject: [PATCH 38/56] removed end of line $ --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 275d48f..69bfe70 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [NC]" + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [NC]" ] From 5e0ec0e130bbbf3d15025d464b6405b4e35139b3 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Thu, 20 Aug 2020 10:15:51 -0400 Subject: [PATCH 39/56] short rules test --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 69bfe70..fa97e0f 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,3 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [NC]" + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]" ] From bc9ccf3f8f4cbd2bf2e4243e1d95a1292a777b45 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Thu, 20 Aug 2020 10:33:43 -0400 Subject: [PATCH 40/56] reverting back to a previous commit --- rules_.json | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index fa97e0f..1c0855b 100644 --- a/rules_.json +++ b/rules_.json @@ -1,3 +1,33 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*)$ https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation$1 [NC]" + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer$1", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]" ] From 00520f9e49674c1a9176d683748a552cb6c76955 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Thu, 20 Aug 2020 10:50:35 -0400 Subject: [PATCH 41/56] removed target domainName --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 1c0855b..544eb95 100644 --- a/rules_.json +++ b/rules_.json @@ -28,6 +28,6 @@ "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]" ] From 26c17ab08f1b78968681e18f2d54c8456f18439a Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Thu, 20 Aug 2020 11:11:49 -0400 Subject: [PATCH 42/56] added Hostmatch rule --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 544eb95..272d3b8 100644 --- a/rules_.json +++ b/rules_.json @@ -28,6 +28,6 @@ "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [H=maps-stage\\.services\\.geo\\.ca]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]" ] From 03ea5f01ee9e65ef8533eb78d51ac00eb768fed6 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Thu, 20 Aug 2020 12:00:46 -0400 Subject: [PATCH 43/56] removing slashes from host address for hostmatch --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 272d3b8..e691384 100644 --- a/rules_.json +++ b/rules_.json @@ -28,6 +28,6 @@ "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [H=maps-stage\\.services\\.geo\\.ca]", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [H=maps-stage.services.geo.ca]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]" ] From 1314b42a10921f35d1bb7deaba9460a8c88732be Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Thu, 20 Aug 2020 12:30:44 -0400 Subject: [PATCH 44/56] (.+) capture group test --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index e691384..d189080 100644 --- a/rules_.json +++ b/rules_.json @@ -28,6 +28,6 @@ "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer(.*) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer/WMSServer$1 [H=maps-stage.services.geo.ca]", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]" ] From 530acac646dc405dab11d410c629ea63598b3d50 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Thu, 20 Aug 2020 15:24:33 -0400 Subject: [PATCH 45/56] reduced rules --- rules_.json | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/rules_.json b/rules_.json index d189080..060b054 100644 --- a/rules_.json +++ b/rules_.json @@ -1,33 +1,7 @@ [ - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer$1 [R]", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/MapServer/WMSServer$1", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/MapServer/WMSServer$1", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer(.*) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/MapServer$1", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer(.*) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer(.*) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/MapServer/WMSServer$1 [R]" + "^/hosted/rest/services/EGS_SGU/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R]", + "^/hosted/services/EGS_SGU/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/$1 [R]", + "^/hosted/rest/services/Hosted/(.+) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection(.+) https://maps-stage.services.geo.ca//egs_sgu/services/Acquisition_Plan/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/$1 [R]" ] From addff45ae0cc45df848bd144be7e5ace1294765a Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Thu, 20 Aug 2020 15:39:54 -0400 Subject: [PATCH 46/56] revert back the previous rule and added Redirect --- rules_.json | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/rules_.json b/rules_.json index 060b054..bc67c24 100644 --- a/rules_.json +++ b/rules_.json @@ -1,7 +1,33 @@ [ - "^/hosted/rest/services/EGS_SGU/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/$1 [R]", - "^/hosted/services/EGS_SGU/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/$1 [R]", - "^/hosted/rest/services/Hosted/(.+) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/$1 [R]", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection(.+) https://maps-stage.services.geo.ca//egs_sgu/services/Acquisition_Plan/$1 [R]", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/$1 [R]" + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_en/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Active_fr/(.+) /egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Active_fr/$1", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_en/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/$1 [R] ", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Archive_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_en/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Active_FP_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Active_FP_fr/$1 [R]", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/(.+) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Active/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_en/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Current_FP_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Current_FP_fr/$1 [R]", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/(.+) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Current/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/$1 [R]", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/(.+) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]" ] From d3edbd1c8010a950d0163a5ecea55bfccdff1ab5 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Fri, 21 Aug 2020 10:22:42 -0400 Subject: [PATCH 47/56] testing simple path --- rules_.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rules_.json b/rules_.json index bc67c24..b2b8b19 100644 --- a/rules_.json +++ b/rules_.json @@ -5,7 +5,7 @@ "^/hosted/services/EGS_SGU/EGS_Flood_Product_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Active_fr/$1 [R] ", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_en/$1 [R]", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Current_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Current_fr/$1 [R]", - "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/$1 [R]", + "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_en/(.+) https://maps-stage.services.geo.ca/egs-sgu/services/Flood_Inondation/EGS_Flood_Product_Current_en/$1 [R]", "^/hosted/services/EGS_SGU/EGS_Flood_Product_Current_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Current_fr/$1 [R]", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_en/$1 [R]", "^/hosted/rest/services/EGS_SGU/EGS_Flood_Product_Archive_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Flood_Inondation/EGS_Flood_Product_Archive_fr/$1 [R]", @@ -29,5 +29,6 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]" + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", + "/oldpath /newpath [NC]" ] From 4b94822a63d8150a031855fbd3d6547e25fbccc8 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Fri, 21 Aug 2020 10:28:16 -0400 Subject: [PATCH 48/56] test rewrite --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index b2b8b19..dee3af0 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,5 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", - "/oldpath /newpath [NC]" + "^/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr /egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en [NC]" ] From fcd3df0fdb1b25eb06b30d1f85dab5b04919e9ee Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Fri, 21 Aug 2020 10:34:12 -0400 Subject: [PATCH 49/56] rewrite test --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index dee3af0..d337e45 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,5 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", - "^/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr /egs_sgu/services/Flood_Inondation/EGS_Flood_Product_Archive_en [NC]" + "^/alb https://arcgis-bl-3-dev-pub-alb-1289894821.ca-central-1.elb.amazonaws.com/portal/home [NC]" ] From 99b5e8ead75de2a2f36116d1a3e90e155e925694 Mon Sep 17 00:00:00 2001 From: Naeem UlHaq Date: Fri, 21 Aug 2020 10:37:42 -0400 Subject: [PATCH 50/56] r switch --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index d337e45..a43030d 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,5 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", - "^/alb https://arcgis-bl-3-dev-pub-alb-1289894821.ca-central-1.elb.amazonaws.com/portal/home [NC]" + "^/alb https://arcgis-bl-3-dev-pub-alb-1289894821.ca-central-1.elb.amazonaws.com/portal/home [R,NC]" ] From b957429ac6959fb3e678533569eeea31286bf95b Mon Sep 17 00:00:00 2001 From: Naeem UL-Haq <10832647+naeemhaq@users.noreply.github.com> Date: Sun, 23 Aug 2020 00:02:28 -0400 Subject: [PATCH 51/56] removing redirect rule --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index a43030d..d337e45 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,5 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", - "^/alb https://arcgis-bl-3-dev-pub-alb-1289894821.ca-central-1.elb.amazonaws.com/portal/home [R,NC]" + "^/alb https://arcgis-bl-3-dev-pub-alb-1289894821.ca-central-1.elb.amazonaws.com/portal/home [NC]" ] From 9cbf9f2d203b0615177173253820ddf7518f392d Mon Sep 17 00:00:00 2001 From: Naeem UL-Haq <10832647+naeemhaq@users.noreply.github.com> Date: Sun, 23 Aug 2020 00:08:29 -0400 Subject: [PATCH 52/56] Update rules_.json --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index d337e45..e634379 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,5 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", - "^/alb https://arcgis-bl-3-dev-pub-alb-1289894821.ca-central-1.elb.amazonaws.com/portal/home [NC]" + "^/alb /portal/home [NC]" ] From 2c43b3ff91a1308747959e58da16fa2c121e34d6 Mon Sep 17 00:00:00 2001 From: Naeem UL-Haq <10832647+naeemhaq@users.noreply.github.com> Date: Sun, 23 Aug 2020 00:16:50 -0400 Subject: [PATCH 53/56] Update rules_.json --- rules_.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rules_.json b/rules_.json index e634379..b2828de 100644 --- a/rules_.json +++ b/rules_.json @@ -24,11 +24,11 @@ "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/$1 [R]", "^/hosted/rest/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/$1 [R]", "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_en/$1 [R]", - "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/$1 [R]", - "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/(.+) https://maps-stage.services.geo.ca/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/$1 [R]", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", - "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1 [R]", - "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) https://maps-stage.services.geo.ca/egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1 [R]", - "^/alb /portal/home [NC]" + "^/hosted/services/EGS_SGU/EGS_RiverIce_Product_Archive_FP_fr/(.+) /egs_sgu/services/Ice_Glace/EGS_RiverIce_Product_Archive_FP_fr/$1", + "^/hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/(.+) /hosted/rest/services/Hosted/EGS_RiverIce_Product_Archive/$1", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) /egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1", + "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) /egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1", + "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1", + "^/alb /lastruleapplied [NC]" ] From 9d8054bd17c59436ffc17c92da0db61c1909817c Mon Sep 17 00:00:00 2001 From: Naeem UL-Haq <10832647+naeemhaq@users.noreply.github.com> Date: Sun, 23 Aug 2020 09:26:31 -0400 Subject: [PATCH 54/56] Update rules_.json --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index b2828de..459a3dc 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,5 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) /egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1", - "^/alb /lastruleapplied [NC]" + "^/alb /portal/home" ] From 441f0e46faa74412c621441b3d414392aa10bab7 Mon Sep 17 00:00:00 2001 From: Naeem UL-Haq <10832647+naeemhaq@users.noreply.github.com> Date: Sun, 23 Aug 2020 09:49:31 -0400 Subject: [PATCH 55/56] Update rules_.json --- rules_.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 459a3dc..266d4d4 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,5 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) /egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1", - "^/alb /portal/home" + "^/alb /portal/home [H=maps-stage.egs-redir.services.geo.ca]" ] From eabea816da6d65492665ab066f73a8ad34f4a204 Mon Sep 17 00:00:00 2001 From: Naeem UL-Haq <10832647+naeemhaq@users.noreply.github.com> Date: Sun, 23 Aug 2020 13:44:11 -0400 Subject: [PATCH 56/56] Update rules_.json --- rules_.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules_.json b/rules_.json index 266d4d4..4d703c9 100644 --- a/rules_.json +++ b/rules_.json @@ -30,5 +30,6 @@ "^/hosted/rest/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) /egs_sgu/rest/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_en/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_en/$1", "^/hosted/services/EGS_SGU/EGS_AcquisitionPlan_Collection_Active_fr/(.+) /egs_sgu/services/Acquisition_Plan/EGS_AcquisitionPlan_Collection_Active_fr/$1", - "^/alb /portal/home [H=maps-stage.egs-redir.services.geo.ca]" + "^/alb /portal/home [H=maps-stage.egs-redir.services.geo.ca]", + "^/oldpath /newpath" ]