Tag: nginx redirect

Redirect location/folder on nginx.

Redirect location/folder on nginx.

To redirect folder on nginx you cane add to the configuration file this lines: nano /etc/nginx/sites-available/default location ~ /<strong>folder-name</strong>/(.*)$ { rewrite ^/<strong>folder-name</strong>/(.*)$ /new-name/$1 permanent; } to redirect location on nginx: rewrite ^/folder-name/myWell-known-article /folder-name/my-new-name-article permanent; Flags use to redirect As earlier mentioned, there are few flags […]