title: YII 2, Method Not Allowed (#405)
body: <ul>
  <li>When i delete a Record in GridView i got this Error on my Hosting
  Server.</li>
  <li>Local its working without Problems.</li>
  </ul>
  
  <p><strong>What i dont understand is:</strong></p>
  
  <blockquote>
    <p>The error says -> Method Not Allowed. This url can only handle the
    following request methods: POST.</p>
  </blockquote>
  
  <p><strong>When i look at my Code:</strong></p>
  
  <pre><code>public function behaviors()
      {
          return [
              'verbs' =&gt; [
                  'class' =&gt; VerbFilter::className(),
                  'actions' =&gt; [
                      'delete' =&gt; ['POST'],
                  ],
              ],
          ];
      }
  </code></pre>
  
  <p>ITS POST?!</p>
  
  <p>When i change to GET it works without error, but also without Delete Confirmation Prompt....</p>
  
  <p><strong>I have to Questions:</strong></p>
  
  <ul>
  <li>Why i get a Message -> allows only post, when it is Post?</li>
  <li>How do i get an Delete Confirmation, when i change to GET</li>
  </ul>
  
  <p>Sorry for my English and Thank you so much for help.</p>
  
  <p><a href="https://i.stack.imgur.com/n1rPq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n1rPq.png" alt="enter image description here"></a></p>