Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8396753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:37:11+00:00 2026-06-09T20:37:11+00:00

quick question: I have created a web server using CherryPy. It requires authentication for

  • 0

quick question: I have created a web server using CherryPy. It requires authentication for all pages, so my default handler returns the login page object. Due to the way that CherryPy handles the dispatches, somebody who requests:

localhost:80/a/b/c

would be redirected to:

localhost:80/a/b/login

however, I’d like all unauthenticated requests to be invoked from the root level, independent of the potential additional parameters added in the HTML request, e.G.:

localhost:80/a/b/c --> localhost:80/login

Currently I am solving this by returning a HTML based redirect:

'<meta http-equiv="REFRESH" content="0;url=/login">'

I feel this is a very unclean solution and would rather want to use a CherryPy based solution. I looked at cherrypy.HTTPRedirect and cherrypy.url, but I haven’t found a way to make them work for this problem.

Any thoughts?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:37:12+00:00Added an answer on June 9, 2026 at 8:37 pm

    You can specify the login page with a redirect: raise cherrypy.HTTPRedirect("/auth/login")

    But, take a look here, there is a sample of how to write an authentication routine:

    http://tools.cherrypy.org/wiki/AuthenticationAndAccessRestrictions

    There is also an example of how to redirect the user back at the requested page after login.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick question I have a database with snapshot enabled using ALTER DATABASE myDB SET
Hi I have a quick question regarding json responses from the web services, I
I have created a quick example to demonstrate my question. From the log below
this is a quick question: I have this Database Project in a Web app
hey, quick question, i couldn't find anything on the web. I have a parent
Just have a quick question about the GAC I created an assembly Awesome.DLL. Had
I have a quick question. I created a class in the Form2 called MyObject
I'm new to Drupal and I have a quick question: I've created a content
I have just a quick question: Are files created before they are finished, or
Quick and hopefully obvious question. I have a progmatically created button in my iPhone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.