Title: Private Page Forbidden
Author: Weston Ruter
Published: <strong>September 28, 2009</strong>
Last modified: September 28, 2009

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/private-page-forbidden.svg)

# Private Page Forbidden

 By [Weston Ruter](https://profiles.wordpress.org/westonruter/)

[Download](https://downloads.wordpress.org/plugin/private-page-forbidden.zip)

 * [Details](https://wordpress.org/plugins/private-page-forbidden/#description)
 * [Reviews](https://wordpress.org/plugins/private-page-forbidden/#reviews)
 * [Development](https://wordpress.org/plugins/private-page-forbidden/#developers)

 [Support](https://wordpress.org/support/plugin/private-page-forbidden/)

## Description

_This plugin is developed at [Shepherd Interactive](http://www.shepherd-interactive.com/)

for the benefit of the community. No support is available. Please post any questions
to the [support forum](https://wordpress.org/tags/private-page-forbidden?forum_id=10).

Instead of serving a 404 Not Found error with the `404.php` template, send a 403
Forbidden error and set `$wp_query->is_403` and load 403.php if it exists.

Provides a filter `forbidden_redirect` which if results in a non-empty filtered 
value will result in the user being redirected if attempting to visit a forbidden
page; the default value is `""` (no redirect).

Useful with a filter which selectively prevents a private post from being forbidden,
so that the page will not show up in the navigation and won’t be included in XML
Sitemaps, for example.

    ```
    function my_filter_private_posts($posts){     if(is_singular() && $posts[0]->post_status == 'private'        && #Now optionally allow/disallow based on user session:        in_array($_SERVER['REQUEST_URI'], (array)@$_SESSION['allowed_private_uris']))     ){         header('Cache-Control: private'); #Prevent proxies from caching this private page         $posts[0]->post_status = 'publish';     }     return $posts; } add_filter('posts_results', 'my_filter_private_posts');
    ```

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Private Page Forbidden” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)

[Translate “Private Page Forbidden” into your language.](https://translate.wordpress.org/projects/wp-plugins/private-page-forbidden)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/private-page-forbidden/),
check out the [SVN repository](https://plugins.svn.wordpress.org/private-page-forbidden/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/private-page-forbidden/)
by [RSS](https://plugins.trac.wordpress.org/log/private-page-forbidden/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2009-09-28: 0.2

 * Initial release

## Meta

 *  Version **0.2**
 *  Last updated **17 years ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 2.7 or higher **
 *  Tested up to **2.8**
 * Tags
 * [403](https://wordpress.org/plugins/tags/403/)[access-control](https://wordpress.org/plugins/tags/access-control/)
 *  [Advanced View](https://wordpress.org/plugins/private-page-forbidden/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/private-page-forbidden/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/private-page-forbidden/reviews/)

## Contributors

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/private-page-forbidden/)