(apache / nginx) redirect / forward traffic from root to another folder

Use the following rule in nginx

location = / {
    return 301 https://www.example.com/folder;
}

Use the following with apache

RewriteRule ^$ /folder [L]
Print Friendly, PDF & Email

More Like This


Categories


Web Hosting

Tags


  • Post a comment