401 Redirect - Post ID 104257

User 399197 Photo


Registered User
46 posts

I thought I'd give others a "heads up" as I monitor the WAM team's response to this item.

Recently, I was having some .htaccess problems I thought were being created by WAM. Turns out, they were of my own making. I hate it when that happens!
As I continued to experiment, I tried to create some custom error return pages to respond to the case where a page is missing or mis-filed (404 file not found error) and also for the case where someone is trying to access a folder to which they do not have the proper permissions. In this case, I wanted to inform them why they were receiving the error: (1) they had not yet registered, in which case I provided a link on the error page to the registration form, (2) their access permissions may have expired (e.g. for non-payment of dues), and (3) their status had been revoked for some other reason. Return was to the site's home page (no special permission required for that page).

WAM, under their Advanced Configuration menu, allows us to select from a number of trappable error options, one of them being "403 Forbidden Requests". Seemed reasonable, so I put my redirect there, and proceeded to test my site, at which time I discovered that I could not trap the case for no/invalid permission. As I researched this "glitch" I discovered that my server was throwing the 401 error. It turns out that this is in fact the error that SHOULD be thrown for the case where authentication is possible but has failed or not yet been provided. Seeing as how that's really what the .htaccess file is all about -- managing permissions -- then you'd think that ought to be a trappable error included in their errors list. It is not.

I worked with Cesar on this, and he said that he forward my input to the WAM team. It seems like this would be a pretty simple thing, so I was a bit disappointed when it was not included in the recent WAM 3.1 upgrade. Oh, well.

Here's what it means to those of us who need to trap the 401 error. You need to do it manually using your favorite FTP client. What I've been doing is entering the proper redirect under the 400 error in WAM, and then using my FTP client to edit the WAM-created server-side .htaccess file so that the redirect is in fact for the 401 error. This particular .htaccess file resides in your site’s root directory.

Sounds easy enough, right? Well, it is. However, in my case I'm managing our homeowners' association site, and as people sign up, I need to assign them permissions. When I upload the revised .htaccess and .htpasswd files, I then need to (again) manually edit the root .htaccess file to render the correct 401 response. This is kind of a pain, but is a necessary evil until the WAM team provides a reference to the 401 error.

Dick
User 103173 Photo


VP of Software Development
0 posts

Ask you shall receive Dick. I just added 401 Redirect to the latest version of Website Access Manager. Go to http://www.coffeecup.com/help/myorders and download build 194.

So to re-cap, you made post in our forums 1.5 hours ago, and we delivered the software update with the suggested feature. Now try and ask another company for such a service ;)

http://www.coffeecup.com/files/forums/401redirect.png


Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 629005 Photo


Ambassador
2,174 posts

OMG! 1.5 hours, are you freaking kidding me? I can't believe it took soooo long :D
Living the dream, stocking the cream :D
User 399197 Photo


Registered User
46 posts

Jeez, what can I say? CC is the best.

I choose to believe that the team was just getting ready to push it out, anyhow. NOBODY can be this good, right?

Anyhow, thans so much.

Dick
User 103173 Photo


VP of Software Development
0 posts

Actually no. I read your forum post, talked with our programmers and they added it in. Yeah, we are that good ;)
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 399197 Photo


Registered User
46 posts

I am unworthy...

Dick
User 38401 Photo


Senior Advisor
10,951 posts

*pretends she has a clue what that whole speel actually meant and goes and downloads it since she knows it must be something really good or it wouldn't have been such a fast and furious update*! :P
User 103173 Photo


VP of Software Development
0 posts

Wolverana wrote:
*pretends she has a clue what that whole speel actually meant and goes and downloads it since she knows it must be something really good or it wouldn't have been such a fast and furious update*! :P


*Scott starts to shake uncontrollably.....*
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 38401 Photo


Senior Advisor
10,951 posts


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.