Control Web Panel
WebPanel => Apache => Nginx => Topic started by: gailclark80 on April 02, 2025, 09:06:57 AM
-
My web servers are Nginx & Apache, I want to set up redirects, I added 301 code in htaccess but doesn't work, I don't know how to set up 301 redirects for Nginx.
301 redirects
Target: (.*?) ?roy1/.*?html
To: $1
-
.htaccess is for Apache; nginx will ignore them. Edit the virtual host conf file under the [server] directive block -- the basic construct is to use this syntax:
return 301 http://www.example.com$request_uri;