import flask app = flask.Flask(__name__, subdomain_matching=True) app.config['SERVER_NAME'] = 'test.sex:666' @app.route('/') def index(): return flask.render_template('index.html') @app.route('/', subdomain='gay') def testindex(): print('It works!') return flask.render_template('testindex.html') def main(): app.run('test.sex', 666) # flask.url_for('static', filename='style.css') # flask.url_for('static', filename='fonts.css') if __name__ == '__main__': main()