Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



SEO Class in Chicago, IL

Learn How To Optimize Your Website on July 26, 2013


Looking for personalized in-depth SEO training among your peers?



High Rankings is offering a 1-day customized SEO training class in Chicago. Class size is limited so please sign-up now if you want in!



 


Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Multiple Uses Of Htaccess


  • Please log in to reply
8 replies to this topic

#1 slm64

slm64

    HR 2

  • Active Members
  • PipPip
  • 23 posts
  • Location:Christchurch, NZ

Posted 09 November 2004 - 02:45 PM

Can anyone tell me whether you can use htaccess to perform both authentication and conditional redirection? What I want to do is authenticate users into our secure section, and then redirect them to a particular subdirectory based on group membership (htgroup). Presumably this would involve multiple htaccess files - one in each group's subdirectory - although I hope that it might be achievable with only one password prompt.

For a smooth user experience, what I am hoping to achieve is a single page along the lines of "blah blah blah, for entry to the secure section, click here" then a link to a page within the main secure directory (with the authentication htaccess), which the users probably never actually see as they would be automagically transferred to the appropriate subdirectory.

I can play with our htaccess ok but the server doesn't allow any scripts or "anything dynamic".

Thanks in advance for any help...

Sarah

#2 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 09 November 2004 - 06:53 PM

Hi Sarah,

If I'm understanding your question correctly, it'll be something that is going to be basically impossible with just htaccess. It just doesn't play very well with regular expressions and conditionals.

It can however be done if you toss a bit of scripting into the mix.

Your server doesn't support any server side scripting languages like PHP or ASP?

#3 slm64

slm64

    HR 2

  • Active Members
  • PipPip
  • 23 posts
  • Location:Christchurch, NZ

Posted 10 November 2004 - 02:21 PM

QUOTE(Randy @ Nov 9 2004, 07:53 PM)
Your server doesn't support any server side scripting languages like PHP or ASP?

No, no scripting. We had a choice of Windows server with ASP, or Linux without.

If scripting is the only way, what would be the implications of changing (the ones that they're not telling me about)? Windows anything is generally more prone to all sorts of unexpected behaviours, in my experience so far...

#4 Shane

Shane

    HR 6

  • Active Members
  • PipPipPipPipPipPip
  • 850 posts
  • Location:Atlanta, GA

Posted 10 November 2004 - 02:41 PM

I've used Windows hosting for years and have been very happy with it. That said, if you're very familiar with Linux I think I'd stay there and look at some way to get PHP into the mix. You don't want to have to be learning Windows and ASP/ASP.NET on top of everything else.

#5 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 10 November 2004 - 03:09 PM

No major security implications of installing PHP on a linux box. Might as well install MySQL as well while you're at it. Frankly, it's been a few years now since the last time I saw a *nix server that didn't have at least that much available.

I don't do Windows servers myself for various reasons. One of those being that 90% of the hack attempts on my *nix boxes are specifcally targetting known Windows securityy holes. lol.gif

That said, as long as security is a top priority either is relatively safe. All you have to do is start off with a good plan and stay on top of any patch releases.

#6 slm64

slm64

    HR 2

  • Active Members
  • PipPip
  • 23 posts
  • Location:Christchurch, NZ

Posted 10 November 2004 - 05:36 PM

We are hosted externally, so ensuring that patches are applied promptly is beyond our immediate control. But, I have checked and the good news is that we can do limited PHP scripting after all.

That said, I've never attempted any so do you have some pointers you could share?

#7 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 11 November 2004 - 06:19 AM

There are lots of php scripts out there freely available that will let you set up forwarding and manage htgroups. They're all pretty similar, in that they read the username that is input into a form, decide what htgroup the username belongs to, then forwards the user off to the appropriate area.

I haven't looked, but I'm sure that HotScripts.com has at least a couple of freebie scripts that'll accomplish the task. Just search in their PHP area for "htgroup" and it should pull up some options for you.

#8 slm64

slm64

    HR 2

  • Active Members
  • PipPip
  • 23 posts
  • Location:Christchurch, NZ

Posted 14 November 2004 - 08:37 PM

Thanks very much for your advice Randy, it is great to have people around who are willing to share their experience and resources so that the rest of us can learn too.

#9 Randy

Randy

    Convert Me!

  • Moderator
  • 17,540 posts

Posted 14 November 2004 - 08:53 PM

My pleasure Sarah.

That's what we're all here for. wink.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users