Route / Speaking URL for own MVC

Hallo,

I have my own website package (Acme.Website). In this package I created my own Controller Newsletter, its Model and the corresponding View. The node type of the Newsletter is a plugin and the first action is the registerFormAction. The view of this action contains a form. The node type is stored in the page newsletter. So when I visit “_http://dev.cms.neos.acme/newsletter.html_” I will see my form. When the form is submitted it executes the registerSaveAction. That works like a charm, but the URL is not a speaking one and looks like this:

http://dev.cms.neos.acme/newsletter.html?--acme_website-newsletter[%40package]=acme.website&--acme_website-newsletter[%40controller]=newsletter&--acme_website-newsletter[%40action]=registersave&--acme_website-newsletter[%40format]=html

I already read this article and tried to create a speaking URL but it doesn’t work.
https://www.stephan-meier.com/schoene-urls-mit-typo3-neos/

This is my configuration:

-
  name: 'Acme.Website newsletter route'
  uriPattern: '{node}/newsletter/{--acme_website-newsletter.newsletter}.{@format}'
  defaults:
    '@package': 'Neos.Neos'
    '@controller': 'Frontend\Node'
    '@format': 'html'
    '@action': 'show'
    '--acme_website-newsletter':
      '@package': 'Acme.Website'
      '@controller': 'Newsletter'
      '@action': 'registerForm'
      '@format': 'html'
  routeParts:
    node:
      handler:    Neos\Neos\Routing\FrontendNodeRoutePartHandler
    '--acme_website-newsletter':
      objectType: '\Acme\Website\Domain\Model\Newsletter'
      uriPattern: 'register'
  appendExceedingArguments: TRUE

Did I miss something?

Furthermore I’m experiencing a strange behavior. I’m using the plugin MOC/NotFound. And every time, when I changed my Routes.yaml file, I’ll get an error that the URI could not be found:

Uri with path “http://dev.cms.neos.acme/404.html” could not be found.

After flushing the cache everything works fine again. But it’s a little bit annoying to flush the cache every time.

Edit:// I think Christian´’s answer on this topic is the solution for your problem, too.