Perform a redirect after user action

It may not be the correct approach, but I found that using wp_loaded does the trick and puts you back in the right spot; you have to set the right conditions to be sure the correct data is being handled. Then strip the url from the conditions before redirecting. Aside from condtions you can also … Read more

htaccess redirect – directory and subpages to a single page

The solution is to put the rewriterule just after RewriteEngine On. <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^definicje(.*)$ http://example.com/single-page/ [R=301,L] RewriteBase / RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>

Redirect feed to 404 page

There are three simple steps to get what you want: Hook into ‘template_redirect’ to act before the feed is displayed. If it is a feed send a 404 status header and load the 404 template. Here is a simple plugin that does it: <?php # -*- coding: utf-8 -*- /** * Plugin Name: T5 404 … Read more

How to redirect action=register link on the lostpassword page to a different link?

Hook into login_form_register and throw people to your registration page with wp_redirect. <?php add_action( ‘login_form_register’, ‘wpse45134_catch_register’ ); /** * Redirects visitors to `wp-login.php?action=register` to * `site.com/register` */ function wpse45134_catch_register() { wp_redirect( home_url( ‘/register’ ) ); exit(); // always call `exit()` after `wp_redirect` } You can also hide the “register” link on that page by hijacking … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)