From: Stephen Cameron Date: Wed, 22 Dec 2021 11:03:40 +0000 (+0100) Subject: Shared dev/prod configuration + SEO redirections. Done #4955 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=HEAD;p=nec-initiative-wordpress.git Shared dev/prod configuration + SEO redirections. Done #4955 @1 --- diff --git a/.htaccess b/.htaccess index 1130147..55ba39c 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,12 @@ +# Password protection for DEV site +# https://httpd.apache.org/docs/2.4/howto/access.html#env + + AuthName "NEC Initiative - DEV" + AuthType Basic + AuthUserFile /homez.368/necinitiys/dev/.htpasswd + Require valid-user + + # Force HTTPS + redirect to non-www subdomain # Ref: https://simonecarletti.com/blog/2016/08/redirect-domain-http-https-www-apache/ @@ -8,6 +17,12 @@ RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301] +# 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.