Plesk allows adding "Additional nginx directives" for hosted websites.
I'm trying to use this to set a 410 header on some old directories, but I can't find anything as simple as RewriteRule ^rss/ - [G]
was in .htaccess
rules. I've seen location /rss/ { return 410; }
suggested but that doesn't work.
Is there a simple nginx directive to 410 a whole directory in Plesk?
location /rss { return 410; }
I have a hunch that will do it based on the examples I've seen. – Stephen Ostermiller♦ Apr 5 '16 at 10:43location ^~ /rss {return 410; }
Regex matches all get applied first, so this makes the rule get applied earlier in case it is other rules getting in the way. – Stephen Ostermiller♦ Apr 5 '16 at 10:50