Redirection issue


#1

How to solve the issues like this

https://govtjobsdata.in/hnbgu-recruitment/.asdsad to be redirected to https://govtjobsdata.in/hnbgu-recruitment/


#2

Try:

    rewrite ^/(.*)/\.(.*)$ /$1 redirect;

#3

It solved the issue for POSTS and Pages but home page it is not solved. Can give code for home page.


#4

I have used rewrite ^/\.(.*)$ /$1 redirect; so dot errors on the home page resolved. is it correct. so i am using both codes

   rewrite ^/(.*)/\.(.*)$ /$1 redirect;
rewrite ^/\.(.*)$ /$1 redirect;

is it correct way