: Redirecting to a specific page if the visitor used a certain name to resolve the server address How can I get visitors redirected to a specific html page if the name used to resolve the server
How can I get visitors redirected to a specific html page if the name used to resolve the server address was a specific one? I tried
if ($http_host ~ /forbiddenname/)
{
rewrite ^(.*)$ /updateyourlinks.html break;
}
inside the Server section, but doesn't work...
More posts by @Cooney921
1 Comments
Sorted by latest first Latest Oldest Best
After some research I found that I should use instead of an if a virtual host... what I've added to nginx configuration is another server
server {
listen 80;
server_name *.badname.com;
rewrite ^ goodname.com/updateyourlinks.html; }
and this apparently works
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.