title: Flask POST request returning to main webpage instead of returning result
body: <p>I want to write a view that asks for some input then returns it as uppercase. I followed the instructions in <a href="https://stackoverflow.com/questions/12277933/send-data-from-a-textbox-into-flask/12278642#12278642">Send Data from a textbox into Flask?</a>.</p>
  
  <p>The app is hosted using Phusion Passenger via cPanel at <code>example.com/form</code>. When I click <kbd>Submit</kbd>, I am sent to <code>example.com</code>. Nothing happens to the text on <code>example.com/form</code> before I am redirected. </p>
  
  <p>What am I doing wrong? Why am I being redirected?</p>
  
  <p><code>templates/form.html</code></p>
  
  <pre><code>&lt;form action="." method="POST"&gt;
      &lt;textarea name="text"&gt;&lt;/textarea&gt;
      &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><code>form.py</code></p>
  
  <pre><code>from flask import Flask, request, render_template
  
  app = Flask(__name__)
  
  @app.route('/')
  def form():
      return render_template('form.html')
  
  @app.route('/', methods=['POST'])
  def form_post():
      return request.form['text'].upper()
  </code></pre>