Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Redirect to target url only if it exists, otherwise do not redirect

$
0
0

Replies: 0

Hi there,

I am trying to implement a redirect where the redirection only happens if the target url exists, ie. if:
– target url exists, redirect
– target url DOES NOT exist, do not redirect/ do nothing

I have tried the following settings but not working (takes a long time to load and eventually shows page “Problem loading page; The page isn’t redirecting properly; An error occurred during a connection to production.zerodegreeshealth.com; This problem can sometimes be caused by disabling or refusing to accept cookies.”):
– source url: ^/members/(.*)
– match: URL and custom filter
– when matched: redirect to url
– with http code: 301- moved permanently
– matched target: https://production.zerodegreeshealth.com/explore/$1
– unmatched target: https://production.zerodegreeshealth.com/members/$1

I have read the documentation but could not work out where I am going wrong, please can you help?


Viewing all articles
Browse latest Browse all 59525

Trending Articles