]> _ Git - nec-initiative-wordpress.git/commitdiff
Shared dev/prod configuration + SEO redirections. Done #4955 @1 master
authorStephen Cameron <stephen@cubedesigners.com>
Wed, 22 Dec 2021 11:03:40 +0000 (12:03 +0100)
committerStephen Cameron <stephen@cubedesigners.com>
Wed, 22 Dec 2021 11:03:40 +0000 (12:03 +0100)
.htaccess

index 1130147a8f7e2c323c5ff489b7712613b32f72d5..55ba39c0fb26088861e19493fc017204dc838b5c 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -1,3 +1,12 @@
+# Password protection for DEV site
+# https://httpd.apache.org/docs/2.4/howto/access.html#env
+<If "%{HTTP_HOST} == 'dev.nec-initiative.org'">
+       AuthName "NEC Initiative - DEV"
+       AuthType Basic
+       AuthUserFile /homez.368/necinitiys/dev/.htpasswd
+       Require valid-user
+</If>
+
 # Force HTTPS + redirect to non-www subdomain
 # Ref: https://simonecarletti.com/blog/2016/08/redirect-domain-http-https-www-apache/
 <IfModule mod_rewrite.c>
@@ -8,6 +17,12 @@ RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
 RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
 </IfModule>
 
+# URL redirections for SEO
+RedirectMatch 301 (?i)^/nec-initiative/how-to-join-the-nec/    /nec-initiative/how-to-join-the-nec-initiative/
+RedirectMatch 301 (?i)^/nec-initiative/why-the-nec-initiative/ /nec-metric/why-the-nec-metric/
+RedirectMatch 301 (?i)^/nec-metric/nec-user-guidelines/ /nec-metric/nec-metric-user-guidelines/
+RedirectMatch 301 (?i)^/nec-metric/how-is-it-useful/ /nec-metric/how-is-the-nec-metric-useful/
+
 # BEGIN WordPress
 # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
 # dynamically generated, and should only be modified via WordPress filters.