Resources

My Agape try

Your Agape try


Support Forum

Current User: Guest Login Register
Please consider registering

Search 
Search Forums:


 




Change 404s to Login Page

UserPost

2:25 pm
August 7, 2008


Aarontcp

Member

posts 4

1

Hi,

I spent most of this morning setting up role scoper to use alongside WP 2.6 and amember.

I have no idea if this is a wordpress or amember or role scoper issue, but I thought I'd ask :)

Something that I haven't been able to work out is this-

If I set a page to private, and restrict its access to a certain role/user-group… when logged in as a member of that user group I can see the page fine.

However, if I am just browsing the site anonymously and type in the "hidden" URL, then I get a 404 error. Is there anyway to instead redirect those anonymous users to a login page (or any other specified page for that matter)?

Cheers,

- Aaron

3:40 pm
August 7, 2008


Kevin

Admin

posts 1326

2

I think that would be best handled by putting a redirect in your your theme's 404.php

If you wanted to get a little more sophisticated, you could do the login redirect only for anon users:

global $current_user;
if ( empty($current_user->ID) )
    header ( 'Location: http://yourloginurl/' );

4:49 pm
August 7, 2008


Aarontcp

Member

posts 4

3

Thanks, I'll give it a go!

Cheers,

- Aaron



Reply to Topic: Change 404s to Login Page

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 5 + 10        (Required)

Topic Reply:


 

About the Agapetry forum

Currently Online:

10 Guests

Maximum Online: 88

Forums:

Groups: 2

Forums: 7

Topics: 667

Posts: 3053

Members:

There are 601 members

There are 1 guests


Kevin has made 1326 posts

Top Posters:

metal450 - 98

YikYak - 58

Ragnar - 36

Daisy - 35

LorenW - 33

Administrator: Kevin | Moderators: Kevin