Loading ...
Sorry, an error occurred while loading the content.

Re: [HTML-on-the-WEB] Htaccess and passwords

Expand Messages
  • Gordon Stewart
    ... Hmm Create a directory even though I dont need it I ll tell you how it goes - Though i dont think it will work (as the 1st htaccess redirects it into the
    Message 1 of 4 , Oct 1, 2007
    • 0 Attachment
      On 10/1/07, Bas van Hoorn <sensei@...> wrote:

      > Hi Gordon,
      >
      > --"As the URL directory doesnt actually exist - How can I add the password
      > part, after the part where it redirects this particular "directory" - But
      > other directories are not passworded ?"
      > --
      >
      > Have you tried putting a second .htaccess file in the physical directory
      > that you want to protect?
      >
      > Then you'd have the .htaccess in your root, that takes care of redirection.
      > If a user is redirected to the protected diretory, it encounters the second
      > .htaccess that takes care of the password. As this file is encountered
      > /after/ the user has been redirected, it shouldn't matter whether the "URL
      > directory" really exists or not.

      Hmm Create a directory even though I dont need it

      I'll tell you how it goes - Though i dont think it will work (as the
      1st htaccess redirects it into the index.php file)... - so wouldnt
      pick up the 2nd htaccess

      But worth a shot...

      --
      G
      NZ community groups - community@...
      Freecycle Auckland :-
      http://groups.yahoo.com/group/AucklandFreecycle/
    • Bas van Hoorn
      Hi Gordon, -- Hmm Create a directory even though I dont need it. I ll tell you how it goes - Though i dont think it will work (as the 1st htaccess redirects it
      Message 2 of 4 , Oct 1, 2007
      • 0 Attachment
        Hi Gordon,

        --"Hmm Create a directory even though I dont need it.
        I'll tell you how it goes - Though i dont think it will work (as the 1st
        htaccess redirects it into the index.php file)... - so wouldnt pick up the
        2nd htaccess"
        --

        Ah, I forgot you're redirecting to your PHP script, not to an actual
        directory.

        But no worries, how about the other way around?

        Create your password directory, with the .htaccess password jigmarole, and
        from /that/ .htaccess file redirect to your main (or any other) script.
        That should work. (Of course in that case, do /not/ redirect your secure URL
        from your main .htaccess!)

        I like this kind of stuff :)
      Your message has been successfully submitted and would be delivered to recipients shortly.