Password-protected page redirecting to frontpage when I enter the password

admin2025-01-08  3

I've enabled built-in password protection on one of my pages. The password form shows up, I enter a password, press Submit button and I'm redirected to my front page.

Now if I revisit the protected page, it will be unlocked (if the password was correct). But I think after I enter the password, I should land directly on the page I'm trying to access, right?

I'm using Wordpress 3.5.2 with a custom theme. What I've tried:

  • tested it on another blog with WP 3.5.2
  • switched theme to unmodified Twenty Twelve
  • disabled all plugins
  • clean WP install on a local server

No luck with any of these, still the same problem - I'm redirected to the server's root (i.e. example/, not example/wordpress or example/wordpress/passpage).

Is it a bug or intended behavior? Is there any workaround I could use?

I've enabled built-in password protection on one of my pages. The password form shows up, I enter a password, press Submit button and I'm redirected to my front page.

Now if I revisit the protected page, it will be unlocked (if the password was correct). But I think after I enter the password, I should land directly on the page I'm trying to access, right?

I'm using Wordpress 3.5.2 with a custom theme. What I've tried:

  • tested it on another blog with WP 3.5.2
  • switched theme to unmodified Twenty Twelve
  • disabled all plugins
  • clean WP install on a local server

No luck with any of these, still the same problem - I'm redirected to the server's root (i.e. example.com/, not example.com/wordpress or example.com/wordpress/passpage).

Is it a bug or intended behavior? Is there any workaround I could use?

Share Improve this question asked Jul 16, 2013 at 13:07 gronostajgronostaj 1111 silver badge5 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

Turns out it was a problem with my browser blocking HTTP referrers.

Disabling referrer blocking or switching to another browser solves the issue.

(related Trac ticket)

Password-protected pages were forwarding to the homepage when the password was entered correctly for me too.

Solution that worked for me:

  • .htaccess - Edited main .htaccess file in cPanel (of site and parent directories if there are nested sites). (Copied entire file to a different location as a backup)

  • Deleted all sections in the .htaccess file except the "# BEGIN WordPress" section (Wordfence, cPanel, etc.), saved the .htaccess file in cPanel.

  • Re-tested the website and it worked just fine. Re-added everything back into the .htaccess file, saved it, and it still continued to work fine.

I have a feeling it was some sort of encoding issue or something along those lines - my .htaccess file is encoded in "utf-8".

I hope this helps as I tried a ton of things and couldn't figure it out, but this random look at the .htaccess file seems to have worked for me.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736268164a1253.html

最新回复(0)