Welcome!
Log In
Create A New Profile
Home
>
Nginx Related Forums
>
Migration from Other Servers
> Topic
Advanced
Specific string = return 404
Posted by
nexon
Forum List
Message List
New Topic
nexon
Specific string = return 404
February 10, 2015 07:37AM
Registered: 12 years ago
Posts: 14
How to when there is a "@" string in the path of the URL - 404 should be returned?
Example:
http://example.com/aa@aa.com/ - should return 404
http://example.com/img/ - should work as usual
Thanks in advance...
Reply
Quote
itpp2012
Re: Specific string = return 404
February 10, 2015 08:39AM
Admin
Registered: 12 years ago
Posts: 1,298
Use map;
map $request_uri $requri {
default 0;
~\@ 1;
}
...................
server {
if ($requri) { return 404; }
}
---
nginx for Windows http://nginx-win.ecsds.eu/
Reply
Quote
Newer Topic
Older Topic
Print View
RSS
Sorry, only registered users may post in this forum.
Click here to login
Online Users
Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024