Redirecting home to /wp-login.php?action=register
Place this in a plugin or in functions.php if(is_home()){ wp_redirect(site_url(‘/wp-login.php?action=register’)); }
Place this in a plugin or in functions.php if(is_home()){ wp_redirect(site_url(‘/wp-login.php?action=register’)); }
Looks like CloudFlare just went live. Any idea what the cause of the troubles is. It would sure be nice to have some kind of inocculation. Okay in that case, CloudFlare requires that you use the “Add WWW” option here. However, if your WordPress install isn’t told to do the same, they conflict and result … Read more
Just like I thought (and had tested on Chrome and IE) the code is rock-solid. This turned out to be an issue with our company’s proxy.
I think you should try to get it to work in some other way. It’s normal it doesn’t work, since the url from the page can’t be changed by the .htaccess, because the url is not your permalink but the new domain. Why not set the name server of the new url, to the old … Read more
Very Basic Script. This should work. add_action(‘template_redirect’, ‘redirect_to_login’); function redirect_to_login(){ if(!is_user_logged_in()){ // user not logged in so redirect them to login page $redirect_url=”” // you can determine where to redirect user after they login wp_redirect( wp_login_url($redirect_url), 301 ); exit; } }
You can just add the .htaccess to the root of the website however be cautious as WordPress will have added it’s own if you have changed the link slug structure within the WordPress admin. In the htaccess file you should use 301 re-direction’s like so: redirect 301 /oldpage.asp http://www.thesite.com/newpage/ If it is a big site … Read more
I would create an AJAX Call from the delete post Link. First, register the AJAX function: add_action( ‘wp_ajax_wpse_delete_post’, ‘wpse_delete_post’ ); I would not add the AJAX function to the nopriv Users, but if you want every visitor of the site (ignoring capabilities) to be able to delete a post, you would have to add this … Read more
No, WordPress only handles changes of individual post slugs, by saving old slugs in post meta. You could try a plugin, like Redirection, to handle old category slug 301 redirects.
$location = The absolute URI to which the user will be redirected. No default. $status = The status code to use. For example, 301, 302, etc. The default is 302. You can use template tags for the $location parameter, for example: <?php // redirect to the home page wp_redirect(home_url()); exit; ?> <?php wp_redirect(‘http://example.com/’, 301); exit; … Read more
Add this to ‘your’ section of the .htaccess file (so not in the WordPress section): Redirect 301 /author http://yourdomain.com/profile