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 7177539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:44:08+00:00 2026-05-28T16:44:08+00:00

I have been toying with http authentication using the .htaccess file in an attempt

  • 0

I have been toying with http authentication using the .htaccess file in an attempt to better my current cms.

I have found a solution in apache whereas, I use a link in my html somewhere <a href=".test">Test</a>.

I then add this to my .htaccess:

<Files .test>
AuthType Digest
AuthNAme "Restricted Page"
AuthDigestProvider file
AuthUserFile /usr/home/myDomain/includes/htpasswd/admin/.htdigest
Require valid-user
# If user is authenticated then redirect
RewriteEngine on
RewriteCond %{REMOTE_USER} !=""
RewriteRule ^.*$ /test.php? [R]
</Files>

What this does, is when a user clicks on the mentioned hyperlink, the user is then prompted with a login form via http authentication. When they enter the correct credentials, they are redirected to a page in the accessable root called test.php, which in turn includes the cms index that is held out of the web root.

If a user selects a section within the cms, they are prompted to log in again (using the sites default php based log in system) and only users with the correct role assignments may access any specfic section.

Although this is useful, it is not quite what i am trying to accomplish.

What i have thought of, is two possible solutions in my case.

One would be where a user could enter say http://www.myDomain.com/?whateveryoulike in the address and be directed to my cms instead. Ideally this redirection would direct straight to my cms index in its’ root directory that is not accessable via http://. Something like this which can be done in php:

if isset($_GET['whateveryoulike']) 
{
include $_SERVER['DOCUMENT_ROOT'] . '/../../admin/blah.php';
}

Another option i thought of would be something i do not know very much about, but it relates to http authentication and i have seen in use once before…

Basically the user enters username@www.myDomain.com and they get prompted with the http auth log in box. When the credentials are met, they are sent to a seperate section within the website.

Would anyone be able to provide any input, suggestions or addittional ideas relating to how i would go about this?

My question though, is if it is possible to actually catch a GET (http://www.myDomain.com/?whateveryoulike) apply http authentication then redirect the user to a page that is held out of the http:// root?

Thank you for taking the time to read through this!

  • 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-05-28T16:44:08+00:00Added an answer on May 28, 2026 at 4:44 pm

    it is possible to actually catch a GET, apply http authentication then redirect the user to a page that is held out of the http:// root?

    No.
    The reason is possible fraud, which was used some years ago.
    Since then browsers refuse to authorize users silently.

    I see no point in the whole enterprize at all, though.

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

Sidebar

Related Questions

I have been toying with some codes to solve this using a Levenberg-Marquardt solver
Hi I have been trying to get this script http://jsbin.com/ipajo5/ working but using .live()
I have been trying all afternoon to get the jQuery Sifr Plugin ( http://jquery.thewikies.com/sifr/
I have been trying to use the hibernate dialect for SQLite from http://code.google.com/p/hibernate-sqlite/ in
I have a scenario that I haven't been able to solve: I'm toying around
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I have been trying to determine a best case solution for registering a COM
I have been trying to shortern this route: http://abc.localhost/user/view/index/id/1 to this: http://abc.localhost/user/1 with the
I have been trying to use the Ocean browsercaps files from http://owenbrady.net/browsercaps/ in a
I'm fairly new to Android and have been toying around with Canvas. I'm attempting

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.