Page template that redirects user based on role

You can use current_user_can() to check the user roles. https://developer.wordpress.org/reference/functions/current_user_can/ To check if the user is editor or administrator: <?php if( current_user_can(‘editor’) || current_user_can(‘administrator’) ) { ?> // Stuff here for administrators or editors <?php } ?> Then to redirect you can use this: header(‘Location: ‘.$newURL);

How To Redirect /url.html to /url?

Try using this in Your .htaccess: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html alternatively You could use in your php code: wp_redirect(str_replace(‘.html’, ”, $url))

WP site in infinite redirect loop

thanks to all those who tried to help. I was able to rule out many options by disabling all plugins, cloudflare etc. but the problem persisted. The root cause turned out to be my own configuration on my host (Kinsta) when adding the SSL cert from LetsEncrypt. I had bound the certificate to https://pokerdiy.com and … Read more