close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

redirect back to restricted page after login

Thread began 1/04/2010 6:02 pm by vze4725c98581 | Last modified 1/07/2010 7:08 pm by Eric Mittman | 5956 views | 6 replies |

vze4725c98581

redirect back to restricted page after login

I have several restricted pages and when link to one of those pages is clicked, the user is redirected to the registration/login page. This works fine.

Once the user has registered or logged in they are take to the protected page. I don't want that, I want user to be taken back to the particular page they were trying to access.

I don't own SecurityAssist.

I know how to do this with Dreamweaver but not using the Registration Solution Pack.

Thanks

Sign in to reply to this post

Eric Mittman

This is the way that the User Registration Solution Pack is designed to work, if the user attempts to access a page that is restricted they will be redirected to the login page. Once they login it should return them to the page that they were restricted from viewing. What controls this is the gotoPreviousURL setting in the authenticate user server behavior on the login page:

php:
"gotoPreviousURL" => TRUE,



If your setting is not set to true like above you should change it to be true.

Sign in to reply to this post

vze4725c98581

Redirect to previous URL - duplicate response

once the user clicks the link to the restricted page they are directed to login. After login I go to the users_Profile.php page with the protected page link. Clicking the protected page only takes me to the protected_Page.php page that says I'm logged in and that my email is verified. Nothing else happens and I am not redirected.


lines 67 -69 and 87-89 on users_LogIn.php reads:

"successRedirect" => "users_Profile.php",
"failRedirect" => "users_LogIn.php?failed=1",
"gotoPreviousURL" => TRUE,


So yes, it does have code "gotoPreviousURL" as true but prior to that is the successRedirect. I need a dynamic redirect that will take the user back to whatever page they wanted to access so redirecting to a specific page won't work for me in this case. I'd like "success Redirect" => go to PreviousURL so that after login user is directed back to page they were trying to access.

Also I don't own Security Assist.

Sign in to reply to this post

Eric Mittman

When you attempt to access a restricted page and are sent to the login page what is in the URL after the page name? There should be some data here that indicates what page was attempted to be accessed. It is this info that the gotopreviousurl setting makes use of.

As a test you could try taking out the successful redirect to see if this gets you to the restricted page originally accessed.

If you can please post back with a URL where I can give this a try myself to see if I can determine what is going wrong.

Sign in to reply to this post

vze4725c98581

Redirect problem

When a user clicks a link to a restricted page they are sent to the users_LogIn.php?accesscheck=%2FAW%2Fusers_Profile.php .

This takes the user to the users_Profile.php page as indicated by trailing url info accesscheck=accesscheck=%2FAW%2Fusers_Profile.php.

What I'd like is for the user to go back to the page they were trying to access not the users_Profile.php page.

Sign in to reply to this post

vze4725c98581

protected page link

User clicks a link to a protected page and is then sent to login/register. After login or registration user should automatically be returned to page they were trying to access.

This is doable using the Dreamweaver server behaviour "login user" and then selecting the option "return to previous url".

Does anyone at your company know or even care to find out why this very basic function does not work in your product? Even when I do as you suggested, to remove lines 67 and 87 from the user_logIn.php which is:

"successRedirect" => "users_Profile.php",

I still can not get a redirect back to the original page I wanted to go. Is there even a working example you can point to that shows it working. I visited the recommended sites and did not see this function, so does this actually work?

I need a response and some help people!

Sign in to reply to this post

Eric Mittman

The way the access restriction should work is that you apply the restriction code to a page that you would like to restrict access to. If the user is not logged in and tries to access a page with the restriction on it the user should be redirected to the login page with the title of the page that sent them there in the URL.

Like you noted it is the page title that is present the in URL when the user gets to the login page that determines what page they will be redirected to after logging in.

Since the access restriction does not seem to be working for you in this way I have opened you a ticket so that we can examine the pages to try and determine what the issue may be.

To update the ticket please login to WebAssist.com and visit your support history.

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...