close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

SA Redirect to two pages

Thread began 1/15/2010 5:41 am by jim286478 | Last modified 1/19/2010 3:53 pm by Eric Mittman | 1392 views | 5 replies |

jim286478

SA Redirect to two pages

In SA I have set up two separate rules to allow access to two different pages based on which rule is satified. However, authenticate user server behavior only allows re-direct to one page so everytime a user logs in, they go to that page no matter what the rule is. When I leave the re-direct blank on the authenticate user, it goes to the login failed page. Is it not possible to re-direct to two pages depending on the rules?
Thanks

Attached Files
SA.zip
Sign in to reply to this post

Eric Mittman

You are correct about how the authenticate user server behavior works. You need to specify a single page for the redirect, but if you come to the page from another page you can have it return the user to the other page if you have the 'go to previous URL' option checked.

Please describe a little about what you are trying to accomplish as the end result and I'm sure that we could give some input that will help you get there. There are many ways that you could customize the pages to get you where you need to go. You could even store the successful redirect in a session variable and just reference that variable in the authenticate user server behavior. Please post back with the details and we will help you with what we can.

Sign in to reply to this post

jim286478

There are two different users. Type 1 and type 2. They each have their own discount for the products. The products and discounts are listed on two different pages. What I am trying to do is when they log in, based on their user types, redirect them to their own page. It has to happen after they log in. The user type is stored in a session variable along with user name and password. They also exist in a database table.
Thanks

Sign in to reply to this post

Eric Mittman

You could do this with a single page rather than two different pages. The idea is that you have a rule for the login, then you have one rule for each of the two types of users.

The page would start out with a logged in user rule applied to the page. If you do this both on the same page then you just need to have show regions for the different users. You would create both displays then use the show region server behavior to make each area only visible to the appropriate users. For example if you had rules for logged in, user type1, and user type2 then the page might be organized like this:

if not logged
send the user to the login page

if user is type 1
show the type 1 information

if the user is type 2
show the type 2 information

So the page would start with an access restriction rule for logged in so that only logged in users can access the page. Next on the page you have your listings for both types of users. Then for the first listing you would select area of the page and apply the show region server behavior, select your rule for the type 1 users. You would then do this same thing for the second display that you have on the page but you would apply the rule for the type 2 user.

You should take a look at the help documentation for Access control > Show region server behavior. There is also a solution recipe on using the show region on the support page under Solution Recipes:

securityassist/

Sign in to reply to this post

jim286478

I didn't know you could have a rule for login page to login different users. Thanks for pointing that out. I certainly will try it and let you know if it doesn't work.
Thanks again.

Sign in to reply to this post

Eric Mittman

You would need to setup your login to set a session variable that you will base the rules for type1 and type2 on. Once you have done that you can use the technique described above to have the login rule at the top of the page and the two other rules used with the show regions to give two different views of the page based on the user you are logged in with.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...