Title: Effect on WP function wp_safe_redirect
Last modified: December 1, 2020

---

# Effect on WP function wp_safe_redirect

 *  [Herky Fishbine](https://wordpress.org/support/users/herky-fishbine/)
 * (@herky-fishbine)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/effect-on-wp-function-wp_safe_redirect/)
 * Hello,
 * I am using a theme that allows user to claim a listing if they are logged in.
   If they are not logged in, they are redirected to a sign in/register page.
 * I was getting great results from Pagespeed Ninja but had to uninstall it because
   it was breaking this redirect. I tried multiple configurations including using
   the safe setting an disabling the landing page redirect.
 * Are there any steps I can take to remedy this problem so I can use the plugin?
   Here is what get broken.
 * User hits this page:
 * > [https://www.website.com/claim-listing/?listing_id=1234](https://www.website.com/claim-listing/?listing_id=1234)
 * If the user is not logged in, the following page should load:
 * > [https://www.website.com/my-account/?redirect=https://www.website.com/claim-listing/?listing_id=1234&notice=login-required](https://www.website.com/my-account/?redirect=https://www.website.com/claim-listing/?listing_id=1234&notice=login-required)
 * … but with Pagespeed Ninja installed, the user stays on the first page.
    -  This topic was modified 5 years, 6 months ago by [Herky Fishbine](https://wordpress.org/support/users/herky-fishbine/).
    -  This topic was modified 5 years, 6 months ago by [Herky Fishbine](https://wordpress.org/support/users/herky-fishbine/).

The topic ‘Effect on WP function wp_safe_redirect’ is closed to new replies.

 * ![](https://ps.w.org/psn-pagespeed-ninja/assets/icon.svg?rev=1722219)
 * [PageSpeed Ninja - Cache, Minify, Defer CSS JavaScript, Critical CSS, Optimize Images, Convert WebP](https://wordpress.org/plugins/psn-pagespeed-ninja/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/psn-pagespeed-ninja/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/psn-pagespeed-ninja/)
 * [Active Topics](https://wordpress.org/support/plugin/psn-pagespeed-ninja/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/psn-pagespeed-ninja/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/psn-pagespeed-ninja/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Herky Fishbine](https://wordpress.org/support/users/herky-fishbine/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/effect-on-wp-function-wp_safe_redirect/)
 * Status: not resolved