Should a redirect to external site have a delay?

This is an interesting question!

If i recall correctly, WCAG have some great resources and guidelines on this. The biggest frustration for me with External Linking UX is that the designer often forgets the affordance before the link is actually clicked.

Telling me that I clicked an external link is too late. I want to know that if i click on the link, that will be an external experience. It saves me time, clicks, and confusion.

The usual solution is an external link-icon next to the link, or a general info in close proximity about how links in a specific section will behave.

I see no problem with your solution, but it shouldn’t be an excuse to skip informing the user before they even click the link. A clear indication to let the user decide whether to click or not, then the need for 10 seconds could probably be reduced to 5-7. Or just skip the auto logic.

Some clients I have worked with implemented solutions where they skipped the automated timing and instead had a button similar to “I understand and want to proceed” (and a Cancel/Back option of course). Above the button, it was a short info about that “this is an external link and this is not associated with us, Org. XyZ, and our liability ends here, etc. Etc.”.

Few of my google search results redirect to the same (or similar?) spam site

This is not really a problem at the moment, but I am asking because I am trying to find out if this is something worth looking into

I do all my searches in chrome. I have not been able to test this in other browsers, but I am interested in chrome as that is what I use most. A few times in my google searches, I get search results that look like normal results, and the page names sound as if they would be something related to what I am looking for, but clicking them always redirects to the same type of spam page (I am not sure if they are all the same page or not, but they’re definitely similar)

For example, one of the results for searching for “nlms feedback cancellation android” in google is (hiding for possible spam link)

http://ds.tefrahomecasaregalo.it/echo-cancellation-using-adaptive-filter-matlab-code.html

which vaguely looks like it might contain what I need, but when I click it it redirects to this spam page:

https://alterwispgong1.live/2723271788/?u=tqck80z&o=zdqr96x&t=drop&cid=2j6g7a92kee1c&f=1&sid=t4~3xm34y05uoaxemxfvroftidq&fp=7CiVcMDVWGdZMsp505v9RBXZXfOQMXrubZfogmr4%2BpXbXugMwqUqlGzHYe3B%2BEhAOIHnlsI627pJOxNxwqq5kf6FSxKMMUrQ%2FdOQMk4CYCPsa6rx9OauPaIJ7u8pPUXU8ZMd4dEl%2FiCKBaYPWElTdB7gJL7uR4h%2FgKyJrulaArTJxmFbBTDWfXeHjGE%2FsTp7UDbgOPPkq8RTB37RgUtXYx3x8FB57nbnHMwVIiu%2F31b2EWYVPkWXXkzaH%2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SyFebEYOIi9LCzY4IU236AFz3uYszA86JSDd47WYmMlS07Uw0PXthwgCcXm17gVMNP9bkUZmaNx5QnchD8iSAnK3zi03UJUF060XKAloODnSMBIdrdrJzIMhyUWpV%2BZUurDOgdtXf3l0iN%2FbVPqQX3%2BnXB0RvUwIcUOuVe%2F%2FRQ63%2BsjqOgHVbdnTQu22c4vNh9cIm7O5S1KcyU%3D

The page is usually a blank page, or shows a dialog box, or contains a gif and claims I have won some prize or something similar. It does not automatically download anything as far as I can tell, and I have never clicked anything on this page. I have seen this page enough times to recognise it and usually just close the tab as soon as I see the redirect on the browser address bar. Usually I would just ignore such links and move on but I have seen this particular type of spam page so often that I am wondering if it is not just a coincidence. At one time I got 3~4 of this same spam page among all my google results, and a lot of the times it is also on the first google results page. I do not log into chrome or google for doing my searches. I do not have any extensions installed or any malware/adware, and chrome usually updates automatically.

Is this just coincidence that I have seen this particular spam page so many times, or is there a possibility something is going on? Since I have clicked such search results before, is it possible google feeds other similar results to me?I had assumed google doesn’t deliberately feed spam pages as search results, but may be I am wrong. It could be that the servers containing the type of information I am looking for are all prone to being attacked by the same type of adware, but I somehow feel that’s not something likely. Again, I would like to stress that it’s not like I am getting a lot of these in every google search. One or two such results pop up every now and then, and I am only looking for confirmation that this is just a coincidence.

man in the middle – Redirect Ip Address (not dns) with Router

I have an IOT System that works the following way:
The IOT bridge makes a TCP Handshake with a server in china with a static ip address 47.255…
(bridge sends syn the china server sends syn ack and then bridge ack)

Then the bridge sends MQTT Connect Command to the chinese server
(This includes a client id, user name, and a password)
The server just sends an accept back.

After that I can use a smartphone app to control the bridge:
The smartphone sends a MQTT packet to the china server
and the server sends the exact same packet to the bridge
(Only the source/destination ips and mac addresses get changed from server to bridge)

I want to remove the chinese server completely from this equation and want to simulate it with my own pc.

So my pc should get every packet that gets send to the chinese ip.
The bridge is in wifi so I have to change this in the router.

Are there easy ways to redirect ip addresses with your router?
Or is it possible to directly modify the packets with the router and change the ip address of the packet.

The Bridge doesn’t use dns to find the chinese ip address so I can’t use a pihole or similar
dns spoofing tools.

And if this works I guess my pc has to spoof it’s source ip address in the packages to the chinese server or the tcp protocol won’t accept the connection with different destinations–>sources.

Append current page URL as redirect to new item link

I am using SP2013 on premise. I have 3 lists: 1. Projects 2. Requirements 3. Issues. Lists 2 & 3 have been added to List 1 DispForm.aspx and a lookup column and query string filter links them so that when a Project is selected a lookup column ID connects/selects only corresponding Requirements and Issues all on the same page. Problem is that when I select the New Item link for Lists 2 or 3 on said page the ID is not included in the url and therefore I cannot do a query string on to pre-fill the Project ID Lookup value. So I need to some how append part of the current page url "…/Lists/Project%20Details/DispForm.aspx?ID=1" (without the &source) and append to the current DispForm.aspx (without the &Rootfolder) as the &Source="…/Lists/Project%20Details/DispForm.aspx?ID=1" but can’t be hardcoded, has to be able to query the ID variable from the current URL. Any suggestions or ideas? I had a solution if I used a Document Set as the Project list but Document Sets proved to be unworkable in other areas so I am using 3 regular lists instead.

How to redirect to same page for changing language via .htaccess config?

Automatic redirects for language are not user friendly and should not be used.

There are two common ways that language redirects are implemented. The first is by identifying the country a person is from based on IP address, and redirecting to the language of that country. There are several problems with this approach:

  1. Geo-IP databases are inaccurate and cannot pinpoint the country of a person 5 to 10% of the time.
  2. Some regions speak multiple languages (like French and English in parts of Canada), it is not always possible to choose a preferred language based on geographic IP address.
  3. People travel but still need access to your site in their native language even when in a foreign country.

The second method relies on the Accept-Language header that most browsers send. There are also problems with it. Most users don’t know how or bother to configure their browsers to send appropriate information. Browsers default to sending an Accept-Language header that matches the language of the browser UI.

  1. Many browsers come in English and users know enough English for that to be OK, but would prefer your site in another language.
  2. Users that speak multiple languages may not have configured their browser with those languages and get redirected away from a language they speak.

In general, this is not a problem you need to solve. Most users don’t ever get to content that isn’t in their language. Search engines users almost always search for terms in their language and search engines send them to pages in their language. You can create a home page that has language choices for users that want to start there.

The better way to handle this situation is to provide a prominent notice and link at the top of the page when your server sees that the language of the page doesn’t match the language in the Accept-Language header sent by the user. That notice might look something like:

This page is in French, but you prefer English according to your browser settings. Click here to view this page in English.

Such a notice can be prominent enough to let users get to their native language, but can also be ignored. If you automatically redirect for users, it is much harder for them to get back to their preferred language if the redirect was done in error.

apache2 – Apache proxy redirect subtree to another server

I have a server which currently redirects everything to a web app running in a docker container on the same machine.

I would like to redirect urls beginning /mail to an instance of mailcatcher running in another docker container.

I got so far with

    ProxyPass /assets/ http://localhost:1080/assets/
    ProxyPassReverse /assets/ http://localhost:1080/assets/
    ProxyPass /messages/ http://localhost:1080/messages/
    ProxyPassReverse /messages/ http://localhost:1080/messages/
    ProxyPass /mail/ http://localhost:1080/
    ProxyPassReverse /mail/ http://localhost:1080/

but I discover mailcatcher uses Web Sockets. If I run a console window in by browser, I see:

GET https://myserver.uk/messages 404 (Not Found)
mailcatcher.js:5 WebSocket connection to 'wss://myserver/messages' failed: Error during WebSocket handshake: Unexpected response code: 404

I am obviously missing something – what should I change in my apache configuration?

dnd 5e – What happens when I redirect an attack with mounted combatant but I am outside the reach of their weapon on a grid?

The mounted combatant feat (PHB 168) allows someone to “force an attack targeted at your mount to target you instead.”

Suppose I am playing on a grid. Let E be enemies without reach/ranged weapons. M be the spaces a large mount occupies. And R be the space I occupy while riding the mount.

$begin{array}{|l|l|r|}
hline
text{E} & \
hline
text{E} & text{M} & text{R}\
hline
text{E} & text{M} & text{M} \
hline
end{array}
$

What happens when I redirect an attack with mounted combatant but I am outside the reach of their weapon on a grid?

event subscriber – Age verification does not redirect to intended language

I have a multi-lingual site and found an age verification module which am trying to tweak.
If I select the English option, the age gate redirects to the global site as intended. However, if I choose a different language, the site redirects back to the age-gate page.

The submitForm method looks like this:

public function submitForm(array &$form, FormStateInterface $form_state) {

  $age = $this->checkAge($form_state);
  if ($age < 18) {
    setcookie('age_gate_fail', 1, strtotime( '+1 days' ), "https://drupal.stackexchange.com/");
    $welcome = newSymfonyComponentHttpFoundationRedirectResponse('https://google.com');
    $welcome->send();

  } else {

    // Add TRUE to session age_verified.
    $session = Drupal::request()->getSession();
    $session->set('age_verified', 1);

    setcookie('age_gate_ok', 1, strtotime( '+1 days' ), "https://drupal.stackexchange.com/");
    setcookie('age_gate_country', $form_state->getValue("country"), strtotime( '+1 days' ), "https://drupal.stackexchange.com/");
    setcookie('day', $form_state->getValue("day"), strtotime( '+1 days' ), "https://drupal.stackexchange.com/");
    setcookie('month', $form_state->getValue("month"), strtotime( '+1 days' ), "https://drupal.stackexchange.com/");
    setcookie('year', $form_state->getValue("year"), strtotime( '+1 days' ), "https://drupal.stackexchange.com/");

    if(Settings::get('local_env')) {

      // Add a redirect to requested page. Using $form_state built in redirects.
      $redirect = $session->get('age_verification_path');
      if (!empty($redirect)) {
        $form_state->setRedirect($redirect);
        $form_state->setRedirect("/{$form_state->getValue("language")}");
      }

      $form_state->setRedirect('<front>');

    } else {

      if($form_state->getValue("language") == 'en') {
        $form_state->setRedirect('<front>');
      } else {
        $host = Drupal::request()->getHost();
        $welcome = newSymfonyComponentHttpFoundationRedirectResponse("http://$host/{$form_state->getValue("language")}");
        $welcome->send();
      }
    }
  }
}

The module comes with the EventSubscriber and the content inside is as follows:

<?php

/**
*
* Contains Drupalage_verificationEventSubscriberpathGate.
*/

// Declare the namespace for our own event subscriber.
namespace Drupalage_verificationEventSubscriber;

use SymfonyComponentHttpFoundation;
use SymfonyComponentHttpFoundationRedirectResponse;
use SymfonyComponentHttpKernelKernelEvents;
use SymfonyComponentHttpKernelEventFilterResponseEvent;
use SymfonyComponentEventDispatcherEventSubscriberInterface;
use DrupalCorePathPathMatcherInterface;
use DrupalCoreSessionAccountInterface;
use DrupalCoreRoutingTrustedRedirectResponse;


/**
* Event Subscriber PathGate.
*/
class PathGate implements EventSubscriberInterface {
/**
   * The path matcher.
   *
   * @var DrupalCorePathPathMatcherInterface
   */
  protected $pathMatcher;

  /**
   * The current user.
   *
   * @var DrupalCoreSessionAccountInterface
   */
  protected $currentUser;

  /**
   * Constructs a new Redirect404Subscriber.
   *
   * @param DrupalCorePathPathMatcherInterface $path_matcher
   *   The path matcher service.
   * @param DrupalCoreSessionAccountInterface $current_user
   *   Current user.
   */
  public function __construct(PathMatcherInterface $path_matcher, AccountInterface $current_user) {
    $this->pathMatcher = $path_matcher;
    $this->currentUser = $current_user;
  }

  /**
   * Code that should be triggered on event specified.
  */
  public function onRespond(FilterResponseEvent $event) {
    // The RESPONSE event occurs once a response was created for replying to a request.
    // For example you could override or add extra HTTP headers in here.
    $response = $event->getResponse();

    $session = Drupal::request()->getSession();

    $age_verified = $session->get('age_verified');

    // If we have a valid session.
    if ( $age_verified == TRUE ) {
            return;
    }
    if (isset($_COOKIE('age_gate_fail'))) {
      $welcome = newSymfonyComponentHttpFoundationRedirectResponse('https://google.com');
      $welcome->send();
    }

    // Make sure front page module is not run when using cli (drush).
    // Make sure front page module does not run when installing Drupal either.
    if (PHP_SAPI === 'cli' || drupal_installation_attempted()) {
      return;
    }

    // Don't run when site is in maintenance mode.
    if (Drupal::state()->get('system.maintenance_mode')) {
      return;
    }

    // Ignore non index.php requests (like cron).
    if (!empty($_SERVER('SCRIPT_FILENAME')) && realpath(DRUPAL_ROOT . '/index.php') != realpath($_SERVER('SCRIPT_FILENAME'))) {
      return;
    }

    // Get saved settings and other needed objects.
    $config = Drupal::config('age_verification.settings');

    // Now we need to explode the age_verification_user_agents field to separate
    // lines.
    $user_agents = explode("n", $config->get('age_verification_user_agents'));
    $http_user_agent = Drupal::request()->server->get('HTTP_USER_AGENT');

    // For each one of the lines we want to trim white space and empty lines.
    foreach ($user_agents as $key => $user_agent) {
      // If a user has string from $user_agent.
      if (empty($user_agent)) {
        unset($lines($key));
      }
      // To be sure we match proper string, we need to trim it.
      $user_agent = trim($user_agent);

      if ($http_user_agent == $user_agent) {
        return;
      }
    }

    // Send to proper page if logged in.
    $skip_urls_config = $config->get('age_verification_urls_to_skip');

    $skip_urls() = '/admin';
    $skip_urls() = '/admin/*';
    $skip_urls() = '/age-verification';
    $skip_urls() = '/user/login';
    $skip_urls() = '/admin/content';

    if (!Drupal::currentUser()->isAnonymous()) {
        $skip_urls() = '/*';
    }

    // Append the urls to skips with some hardcoded urls.
    $skipPaths = $skip_urls_config . "rn" . implode("rn", $skip_urls);

    $request_path = Drupal::service('path.current')->getPath();

    // Check if the paths don't match then redirect to the age verification form.
    $match = Drupal::service('path.matcher')->matchPath($request_path, $skipPaths);
    $is_front = Drupal::service('path.matcher')->isFrontPage();

    // If not the front page then append the requested path alias as a destination parameter.
    if ($is_front == FALSE) {
      $current_uri = Drupal::request()->getRequestUri();
      $destination = '?destination=' . $current_uri;
          
    } else {
      $destination = '';
    }

    // If the requested path is not restricted.
    if ($match == TRUE) {
      return;
    }
    // Redirect to the /age-verification with the destination.
    elseif ($match == FALSE) {

      $redirect = new RedirectResponse('/age-verification' . $destination);
      $event->setResponse($redirect);
    }

  }

  /**
     * {@inheritdoc}
     */
  public static function getSubscribedEvents() {

    $events(KernelEvents::RESPONSE)() = ('onRespond');
    return $events;

  }

}

How do I fix the redirect to take me to any language I want

Need help resolving domain redirect chain

My WP website redirects from http://www.example.com/ → https://www.example.com/ → https://example.com/

How do I resolve this issue and redirect from http://www.example.com/ → https://example.com/?

The goal here is redirect all versions of the website to https://example.com/.

Redirect HTTPS to another HTTPS site without warning

I have recently moved a site over to a new domain. The hosting stayed the same, just a new URL for the site.

I want https://oldsite.com to redirect to https://newsite.com.

I’m getting the Invalid Certificate warning. Is it possible to do this without getting the warning?

I’ve found this question and answer (Redirecting SSL without raising an alert), but it doesn’t quite apply since I’m going from one domain to another and not to a subdomain.