Hello! I need 301 redirect from site.com/category/something to site.com/something/
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
server {
listen 80;
server_name www.bandatnendongnai.vn bandatnendongnai.vn 202.182.98.49;
rewrite ^(.*) https://www.bandatnendongnai.vn$1 permanent;
rewrite ^/du-an(.*) https://$server_name/category/du-an/$1 permanent;
}
server {
listen 443 ssl http2;
server_name bandatnendongnai.vn;
return 301 https://www.bandatnendongnai.vn$request_uri;
rewrite ^/du-an(.*) https://$server_name/category/du-an/$1 permanent;
ssl_certificate /etc/nginx/paidssl/www.bandatnendongnai.vn/www.bandatnendongnai.vn.crt;
ssl_certificate_key /etc/nginx/paidssl/www.bandatnendongnai.vn/www.bandatnendongnai.vn.key;
and then service nginx restart
Check nginx nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Please help me. Thank you so much
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.