Mobile app version of vmapp.org
Login or Join
Lee4591628

: Plesk 410 Directory 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

@Lee4591628

Posted in: #410Gone #Nginx #Plesk

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Lee4591628

1 Comments

Sorted by latest first Latest Oldest Best

 

@Megan663

Use:

location ^~ /rss {
return 410;
}


Regex matches all get applied earlier than other rules, so this makes the rule get applied first. The problem may be that there is some other rule that is getting applied first.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme