Answer the question
In order to leave comments, you need to log in
How to organize an automatic transition to the address '/home' when the user accesses the address '/'?
Here is a screenshot of the project:
Answer the question
In order to leave comments, you need to log in
@webApp.route('/')
def root_page():
return redirect(url_for('main_page'))
@webApp.route('/home')
def main_page() -> str:
return 'Welcome'
If normal, then by means of nginx which will stand before the flag. If hunting on a flask - then give a redirect. If you need the same answer for 2 urls, then write 2 decorators with urls side by side, one under one...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question