Auto redirect after session expire, but only for one user

Does anyone have an insight as to how I could auto redirect only one user instead of for everyone when a session times out?

IE user – paul when his session times out, takes him to instead of the basic re-log in page? Everyone else would still use the default log out redirect.

I am using this in my functions now:


function auto_redirect_after_logout(){   wp_safe_redirect( home_url() );   exit; } 

How does the Hunter ranger’s Horde Breaker feature interact with the Mounted Combatant feat’s ability to redirect an attack to the rider?

Roger is a Hunter ranger that has chosen the Horde Breaker option for the Hunter’s Prey class feature (Player’s Handbook, p. 93):

Once on each of your turns when you make a weapon attack, you can make another attack with the same weapon against a different creature that is within 5 feet of the original target and within range of your weapon.

Roger fires an arrow at Michael, a creature with the Mounted Combatant feat who is currently astride a horse. Roger then uses the Horde Breaker feature to fire a second arrow at Michael’s mount. Michael uses the second bullet point of the Mounted Combatant feat (Player’s Handbook, p. 168) to change the target of Roger’s attack:

You can force an attack targeted at your mount to target you instead.

Does Michael get targeted by two attacks? Or is the second attack no longer permitted, because Michael is not a valid target for Roger’s Horde Breaker attack?

Redirect main domain to subdirectory

Following the following code sample I managed to redirect it, however the site URL on the browser show as and not

RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?$   RewriteCond %{REQUEST_URI} !^/subdirectory/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$   /subdirectory/$  1 RewriteCond %{HTTP_HOST} ^(www.)?$   RewriteRule ^(/)?$   subdirectory/index.html [L] 

Facing problem to implement SSL redirect

I want to add a checkbox button for automatically redirect to HTTPS if SSL is present. the process I added like below:

this is form area:

<form action="options.php" method="POST" id="<?php echo esc_attr( $  data['slug'] ); ?>_options">             <?php settings_fields( $  data['slug'] ); ?>             <?php $  this->render_form_sections(); ?>             <?php $  this->render_hidden_fields(); ?>             <input type="submit" class="wpr-button" id="wpr-options-submit" value="<?php echo esc_attr( $  data['btn_submit_text'] ); ?>"> </form>          

added new field in the form:

$  this->settings->add_settings_fields(         [                          'ssl_redirect'       => [                 'type'              => 'checkbox',                 'label'             => __( 'Enable SSL Redirect', 'rocket' ),                 'section'           => 'enable_ssl_section',                 'page'              => 'hub',                 'default'           => 0,                 'sanitize_callback' => 'sanitize_checkbox',             ], 

added this:

if ( $  wp_rocket_requirement_checks->check() ) {      require WP_ROCKET_INC_PATH . 'main.php';     require WP_ROCKET_INC_PATH . 'custom.php';   } 

this custom.php is added for making action function after checkbox is true state. this is my custom.php

<?PHP   defined( 'ABSPATH' ) || exit;    ?> 

I want to add this function code in cutom.php how to add this and how form action will perform please solve this.

function enable_ssl_redirect() {     if ( isset( $  _SERVER['HTTPS'] ) ) {         if ( 'on' === strtolower( $  _SERVER['HTTPS'] && strpos( home_url(), 'https' ) == false ) ) {         wp_redirect(str_replace( 'http', 'https', home_url() ));     }      if ( '1' == $  _SERVER['HTTPS'] ) {         wp_redirect(home_url());     } } elseif ( isset( $  _SERVER['SERVER_PORT'] ) && ( '443' == $  _SERVER['SERVER_PORT'] ) ) {      wp_redirect(home_url()); }  return false; } 

Redirect to subdomain not working when specifying http scheme

I’ve recently uploaded a website on a domain. Using the domain registrar (NameCheap) I’ve also applied a 301 redirect rule so that going to "@" (for example will redirect to

However, I noticed that if I specify the http scheme like so – I get redirected to, and get an ERR_CONNECTION_REFUSED error.

What’s the reason for that and how can it be fixed? Am I doing some things wrong?

I’ll mention that at first the 301 rule did not work when I specified to go to, and only after replacing the https with regular http did it work (although when visiting the site, I still see in the URL that it is in fact using https).

Redirect user after profile update with a message

I have been working on a website based on woocommerce and have removed the default dashboard on the my account page. But when users update their email id or change their password, it still goes to the dashboard with a message.

  1. I want to redirect users to the same profile page with a message saying "profile updated" when they change their email id.
  2. Redirect users to the login page after changing their password because changing password logs them out. Could you guys help me out?

For time being I tried using the following code to redirect to the home page for the both actions but I get a syntax error while placing the order.

function redirect_me(){   wp_redirect(home_url('/'));   exit; } 

I am a designer with less knowledge about coding. Could you guys help me out here?

Apache redirect to .com

we have a website with 2 different domains: or

and or

I want all requests redirected to

I know I have to create two virtual hosts in Apache and in the .htaccess file for site put the rewrite rule (as explained here I have and to the same site, should I use redirects to avoid duplicate content)

My question is: we have a wildcard SSL certificate for .com domain. Is it possible to redirect HTTPS requests for and to the .com site? Or I should get another SSL certificate for domain?