For new site config I tried NGINX rewriting for the blog plan and keep the paths the same, just redirect from 'www.' to 'blog.'.
and plan for RSpace API and CME have been configured and the ALB.
www.qwerty.com/video/ www.qwerty.com/v/
Blog
www.qwerty.com/blog/category/educator-blog/
blog.qwerty.com/educator/
www.qwerty.com/blog/category/researcher-blog/
blog.qwerty.com/researcher/
www.qwerty.com/blog/category/librarian-blog/
blog.qwerty.com/librarian/
RSpace API
www.qwerty.com/api/external/
review.qwerty.com/api/external/
CME
www.qwerty.com/etc/cme_confirm.php
review.qwerty.com/etc/cme_confirm.php
So I did try this for For the nginx
# Redirect
server {
listen 80;
access_log off;
error_log off;
server_name www.qwerty.com/blog/category/educator-blog/;
return 301 $scheme://blog.qwerty.com/educator/$request_uri;
}
# Redirect
server {
listen 80;
access_log off;
error_log off;
server_name www.qwerty.com/blog/category/researcher-blog/;
return 301 $scheme://blog.qwerty.com/researcher/$request_uri;
}
# Redirect
server {
listen 80;
access_log off;
error_log off;
server_name www.qwerty.com/blog/category/librarian-blog/;
return 301 $scheme://blog.qwerty.com/librarian/$request_uri;
}
but its unable to fulfil our request it seems to just spin, an URL (https://new-dev2.qwerty.com/video/49). Does the order of the rules matter?
I've implemented a temporary fix via the load balancer to have '/video/'
with 'www.qwerty.com' redirected to review.qwery.com/,
IF
Path is/video*
Host is www.qwerty.com
THEN
Redirect tohttps://review.qwerty.com:443/#{path}?#{query}
Status code:HTTP_302
which allows apache redirects to work. but i am looking for the parament fix for NGINX.
output
[root@ip-10-0-11-216 ~]# curl -I http://www.qwerty.com/blog/category/educator-blog/
HTTP/1.1 301 Moved Permanently
Server: awselb/2.0
Date: Mon, 10 Oct 2022 08:19:16 GMT
Content-Type: text/html
Content-Length: 134
Connection: keep-alive
Location: https://www.qwerty.com:443/blog/category/educator-blog/
What is the issue here , any help would be apricated.