I need to disallow the next URLs:
- service api
/_s/user,/_s/place, … All starts with/_s/ - save form:
/{language}/save. For example/{en}/save,/{ru}/save, …
NOTE: most URLs have language parameter at the beginning: /en/event, … I don’t want to block them.
Should be something like: (but this is not allowed by robots.txt format)
Disallow: /_s/*
Disallow: /:lang/save
In
robots.txtmatching is from the left, so it matches anything that begins with/pattern.The wildcard like
/*patternmatches any beginning which must be followed by the givenpattern. Therefore*is never needed on the right (e.g./foo*as it is equivalent to/foo).So in your case you can use
/_s/e.g./_s/foo/en/savebut also/foosaveor/en/save/otherYou can use
$to signify “must end with“/en/saveor/fr/savebut not/en/save/otherYou can find a bit more on robots.txt in Robots.txt : 4 Things You Should Know article
I hope that will help.