latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

404 error on protected pages – no redirect

Home Forums Community Forum 404 error on protected pages – no redirect

This topic contains 15 replies, has 3 voices. Last updated by  Bruce 4 years, 1 month ago.

Topic Author Topic
Posted: Thursday Nov 29th, 2012 at 6:44 pm #32955

I am experiencing a 404 error trying to navigate to protected pages while logged out, instead of being redirected to the membership options page. I am able to access the page using the pretty permalink while logged in.

I have tried resetting the permalinks by saving as default, then saving with the original setting.

When I enter the page id (exampledomain.net/?page_id=1234), instead of the pretty permalink, it will redirect to the membership options page.

All plugins, other than s2member, are currently disabled.

Thank you in advance for your suggestions.

List Of Topic Replies

Viewing 15 replies - 1 through 15 (of 15 total)
Author Replies
Author Replies
Posted: Friday Nov 30th, 2012 at 7:39 am #32988

Did you change your permalinks format after having chosen the Membership Options Page for s2Member? I’ve seen this cause 404s for one user in the past.

I suggest that you go pick the page again and save. [hilite path]Dashboard -› s2Member® -› General Options -› Membership Options Page[/hilite]

If that doesn’t work, could you please tell me what permalink format you’re using?

Thanks!

Posted: Friday Nov 30th, 2012 at 8:14 am #32999

Thank you for your response.

I selected the membership options page again, and saved all changes. I attempted to load the page again logged out – still 404.

I went back and selected default permalinks, saved, then changed back to “Month and Name” /%year%/%monthnum%/%postname%/ (which I think was set by my theme) and saved, still receiving the 404. I also tried changing to Post name, saving and reselecting the membership options page, but that didn’t make a difference.

The protected content is all on pages with specific names: e.g. Peanut – domain.net/peanut or Peanut Butter domain.net/peanutbutter (editing the permalink to remove the hyphen) I am testing it on a page with one word like the former.

Posted: Friday Nov 30th, 2012 at 8:18 am #33000

I should note – I received two types of 404 errors:

When I select default permalinks and save, I get a white page with this:

Not Found

The requested URL /illinois/ was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

With the other permalinks options, I get my theme with this error where the page content should be:

Apologies, but the page you requested could not be found. Perhaps searching will help.

Posted: Friday Nov 30th, 2012 at 8:30 am #33005

I see.

And what is the page that you selected as the Membership Options page? Was it /illinois/ or is that the page that you were trying to load?

Could you show me the URL in the address bar when you get the 404? You can change the domain name, I’m interested in the rest of the URL.

I’d like to take a look at the site, if possible, too. s2Member® » Private Contact Form

Thanks.

Posted: Friday Nov 30th, 2012 at 10:03 am #33009

The page I was trying to load was /illinois (a page with protected content), and the URL showing is http://domain.net/illinois/

The Membership Options page is /registration

Posted: Saturday Dec 1st, 2012 at 3:04 am #33081

I got the email, thanks. I couldn’t get to the WP dashboard, though. Are you being able to open it?

Posted: Saturday Dec 1st, 2012 at 11:26 am #33112

Thank you for checking in!

I just sat down to work on content, and I am now unable to load the dashboard also.

I had no problem accessing the admin yesterday, but this morning I get the redirect error trying to login. Very frustrating.

I will see if I can find the problem, but I’m not sure where to go with this.

Posted: Saturday Dec 1st, 2012 at 11:38 am #33113

Just tried again, and now it’s back!

Posted: Saturday Dec 1st, 2012 at 4:35 pm #33130
Bruce
Username: Bruce
Staff Member

Hi there,

You will need to simply press the “Save All Changes” button at the bottom of your Dashboard -› s2Member® -› General Options page within your WordPress Dashboard. This will update your page’s URL and should fix your issue.

Posted: Saturday Dec 1st, 2012 at 7:52 pm #33156

I did try saving all changes again on the general options page in the s2member dashboard, but I still receive the 404 on a protected page while logged out instead of being directed to the Membership Options page.

Posted: Saturday Dec 1st, 2012 at 8:11 pm #33161
Bruce
Username: Bruce
Staff Member

Hi,

I just took another look back through your posts and it appears that the problem lies in the fact that you have changed the permalinks on your blog. s2Member is not what’s sending the 404, but your site itself.

Try creating a new page (without changing your permalinks again) that requires s2Member level 1, log out, and try to access the new page. This should cause you to be redirected to the Membership Options Page, or at least redirect to the Membership Options Page’s old permalink, which will result still in 404.

Let us know how that goes.

Posted: Saturday Dec 1st, 2012 at 8:49 pm #33166

Thank you for the suggestion.

Giving it a try, and not making any other changes:

I created a new page, domain.net/peanut, with s2member level 1, logged out, and then tried to navigate to that page directly. I got the 404, and the URL said domain.net/peanut.

(I received the error before changing the permalinks. I attempted the permalinks change – to default then back again – as another topic in this forum suggested that as a possible solution to receive the 404 error.)

Posted: Saturday Dec 1st, 2012 at 9:11 pm #33167
Bruce
Username: Bruce
Staff Member

Thanks for the info

Sounds to me like you have something wrong with your .htaccess file. Try resetting the file to WordPress’s defaults. Just edit the file via FTP with your favorite text editor, and replace the data within # BEGIN WordPress and # END WordPress with:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Make sure that if you have any other code within your .htaccess file it goes above this code. If you still have this issue, try deleting these other rules.

You may also want to check this out:

http://www.squidoo.com/wordpress-not-found-error-fix


If this does not solve your issue I’m afraid you may have to reinstall WordPress. s2Member does not have control over what is currently happening with your Permalinks.

You will not need to delete all of the files off of your FTP server, but a DROP of your SQL database and deletion of your wp-config.php file will be needed. This will reset all options that you have set up, and you will need to recreate all of your pages. If you already have several pages set up, it would probably be a good idea to save the data within each page so that you do not have to retype it all.

Posted: Saturday Dec 1st, 2012 at 10:11 pm #33182

Unfortunately, when I changed the .htaccess file, I still received the 404 error when logged out. Changing the permissions to the file also did not help.

As I could get the pages to redirect properly using the page IDs (/?page_id=1234), I selected permalinks back to default and added in the code you suggested back into the .htaccess file. This combination works (at least it is at the moment), it is just circumventing using the page names as the permalinks.

Not attractive, but it will at least work without having to start over so close to launch.

Thank you again for your suggestions!

Posted: Saturday Dec 1st, 2012 at 10:50 pm #33185
Bruce
Username: Bruce
Staff Member

Sorry to hear that you couldn’t get it to work how you need,

You may want to post a thread on this in the WordPress forums, as this seems to be a fairly common occurrence in the general WordPress population.

Viewing 15 replies - 1 through 15 (of 15 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.