How to create a text field that will redirect you to another page when typing a particular word

I want to create a text field in which, when I enter the word "hypnotized" and click Next, it redirects me to a particular page. I do not want that to happen with another word.

Block with list of custom links to redirect to pages

With Drupal 8, I want to create a block with a selection list that I programmatically pull from the taxonomy terms. When the user clicks Submit, he is redirected to the page I put in the list. What is the best way to achieve this? Should I make a custom block with the code for selection inside or is there a module that does that, I've watched the jump menu, but does not look like what I want .

InternetBS: How to redirect (301) a domain name to an existing site?

I would like to redirect an existing domain name in InternetBS to another site.
I am stuck in the DNS manager.
I'm also entering the name server (ns.website.com) + IP from the destination site but that does not work.

I've checked in Google before.

Tracks?

8 – Redirect from a path

I have a routing.yml file with a path that triggers a controller method. When the controller method completes the operation, I want to return the user to the original page. I do not want to rely on the http_referer here because it is already declared unsecured by Symfony.

Drupal::request()->server->get('HTTP_REFERER');

How can I address this problem? Is it possible to do this using optional routing parameters? If that is the case, a little help would be appreciated.

What is the Cloudflare equivalent of these two .htaccess redirect rules?

I usually set up my sites to rewrite URLs in the following cases:

  1. All http traffic is redirected to https (and www), with a 301
  2. All non-www traffic is redirected to www (and https), with a 301

In .htaccess, the rewrite rules are as follows:

RewriteEngine on
RewriteCond %{http_host} ^example.com (NC)
RewriteRule ^(.*)$ https://www.example.com/$1 (L,R=301)

RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} (R=301,L)

Note that all redirects are made with a single hop. Non-www traffic goes to www and https, and non-https traffic goes to https and www. How do you get the same results in Cloudflare?

PS I do not know if the option "Always use HTTPS" from Cloudflare is worth being activated because it does not use 301 code and I have to write a separate rule for a rule of https redirection with code 301 anyway.

Redirect to the cashier instead of the basket

I have a cart icon in the top navigation bar and when we click on it, the page will be redirected to the checkout instead of the shopping cart page.

The reason is that the shopping cart page contains a table that displays the items added by the customer, while the payment page contains the form for the billing address and, again, the table to display the added items to the basket.

So I made the decision to simply redirect to the checkout instead of the cart page to improve convenience and its only redundancy if the customer will go to the cart page to see their items and then checkout where they can see it too.

https – Redirect from www to non-www does not work in Nginx

I can not redirect from www to non-www for one of my domain names. In the past, I used a similar (identical) configuration and it just worked. In a way, it does not work though.

The first section I have is for the desired configuration at the address https://example.org. Basically, no www and served on SSL.

server {
    server_name example.org;

    root /var/www/example.org/html;
    index index.php index.html index.htm;

    access_log /var/www/example.org/logs/access.log;
    error_log /var/www/example.org/logs/error.log;

    try_files $uri $uri/ /index.php$is_args$args;

    # pass PHP scripts to FastCGI server
    location ~ .php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    location ~ /.ht {
        deny all;
    }

    listen 443 ssl; 
    ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem; 
    ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem; 
    include /etc/letsencrypt/options-ssl-nginx.conf; 
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; 
}

Then I have a section to redirect www on https to non-www on https:

server {
    if ($host = www.example.org) {
        return 301 https://example.org$request_uri;
    } 

    listen 443 ssl; 
    server_name www.example.org;
    ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem; 
    ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem; 
    include /etc/letsencrypt/options-ssl-nginx.conf; 
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; 

}

Then I have a section to redirect http to https:

server {
    if ($host = example.org) {
        return 301 https://example.org$request_uri;
    }

    listen 80;
    server_name example.org;
    return 404; 
}

Finally, I have a redirect for www http in non-www https.

server {
    if ($host = www.example.org) {
        return 301 https://example.org$request_uri;
    } 

    listen 80;
    server_name www.example.org;
    return 404; 
}

What I'm waiting to see is this:

  • https non-www -> displays the site;
  • https www -> redirect to https non-www;
  • http non-www -> redirection to https non-www;
  • http www -> redirect to https non-www.

What is really happening:

  • https non-www -> displays the site (good).
  • https www -> displays the default page of NIGNX (bad).
  • http non-www -> redirects to https non-www and then displays the site (good).
  • http www -> redirects to https www, then displays the default NGINX page (incorrect).

What do I forget here? It seems to me that it should work, but it does not work. I've reloaded / restarted nginx, verified that the file had been loaded, reorganized the order of some of these sections, but that did not help.

Thanks for the reading.

How to redirect a folder to another website in nginx?

Ubuntu 16.04
version of nginx: nginx / 1.16.1

I'm trying to redirect traffic from the folder / dealers to a new website,

https://www.domain.tld/dealers/aff.php?aff=8 => https://fqdn.domain.tld/aff.php?aff=8

In my Nginx file, I tried various combinations without success …

location /dealers/ {
  return 301 https://fqdn.domain.tld/$1;
}

location /dealers/ {
  return 301 https://fqdn.domain.tld$1;
}