Questions tagged [redirect]

HTTP or HTML mechanisms used for redirecting browsers to where the actual content is located

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Application actions based on URL

I am sorry if this question was already asked, but I do not know how to frame it differently - none of my searches found something that answers this. I am currently using Windows 11 and XAMPP, with ...
0 votes
0 answers
9 views

HaProxy custom ports

I need to load balancing one of our customers application portal. The flow works as follow: The enduser reach the portal through the URL example.net:3000/login page; The enduser will choose one of ...
2 votes
3 answers
7k views

Nginx: Rewrite while preserving the path

I want to set up a temporary redirect to another domain but I want to keep the path very similar. Here's an example: Request URL: https://api.mydomain.com/uploads/default/logo.png Rewritten URL should ...
0 votes
1 answer
26 views

apache redirects to local IP on virtual machine

I'm having a problem with my apache setup. I'm using a Proxmox server with multiple virtual machines and only one public IP. Apache runs on the Proxmox host and forwards the requests to the virtual ...
1 vote
0 answers
109 views

Apache Server Forward Proxy : How to redirect to a custom page?

On Apache server (Xampp) I have make a forward proxy for firewall filtering that works well, but I don't understand how to use RewriteRule to redirect a forbidden url to a custom error page. I wish to ...
1 vote
1 answer
5k views

Nginx rewrite or redirect for subfolder

I have a Debian 10 server with NGINX. And it is servering several domains. Let me explain the situation: I have setup my HTTP redirects permanently to HTTPS, in a file called redirect.conf. It is ...
0 votes
1 answer
5k views

How to setup correct .htaccess for laravel app on subdomain?

I moved my Laravel application from the development localhost to an internet production subdomain. On localhost everything works. But when I move app to subdomain it seems .htaccess can not handle ...
1 vote
2 answers
564 views

Redirect to specified .php file with try_files if requested .php file not found?

Using nginx I would like to redirect to /redirect.php with try_files if required .php file not found, is it the right way to do so: location ~ \.php$ { ... fastcgi_split_path_info ^(.+\.php)(/...
0 votes
1 answer
45 views

Weird 301-redirect to http from https only happening with CF as proxy on /wp-admin on www subdomain

I have a wordpress blog on an EC2 instance on AWS using the AMI image aws-marketplace/bitnami-wordpress-6.3.2-6-r09-linux-debian-11-x86_64-hvm-ebs-nami-7d426cb7-9522-4dd7-a56b-55dd8cc1c8d0 In ...
-2 votes
2 answers
32 views

301 redirect the old domain with a certain link to a new domain with the same link

I have a problem, I want to redirect htaccess The content of domainold.com is still used, only this URL has changed from the Old website, namely http://domainold.com/product/register to my new site, ...
0 votes
1 answer
4k views

iptables NAT REDIRECT

I have a server that is receiving syslog traffic. Many of my devices can only send to the default udp/514 port. My syslog server can't run on ports <1024 and is running on 5000. I have a nat ...
0 votes
1 answer
31 views

nginx redirect subdirectory

rewrite ^/faq/(.*)$ /faq/$1 redirect; I would like to redirect domain.tld/faq/* to domain.tld/faq/ Unfortunately, this leads to an endless loop. Background: There was the FAQ url and very many other ...
0 votes
1 answer
56 views

nginx redirects with changed response code

I am trying to redirect any location that gives 404 to the front page and change the response code to 302. According to nginx documentation this should be possible? https://nginx.org/en/docs/http/...
0 votes
0 answers
32 views

Kubernates - ExternalName Service rewrite method from POST to GET after HTTPS redirect

Imagine to have this scenario: An API Gateway A Backend Service deployted on a Kuberantes cluster. Also we have: An external authenticated service (imagine an external web application out from our ...
0 votes
0 answers
11 views

Avoiding redirect server's url to www for specific url path

I want to enable auto-verification of deep links in Android for which I need to host the file assetlinks.json on my server https://mycompany.com. This will allow auto-verification of my deep links ...
0 votes
0 answers
39 views

Test Page Apache httpd on docs.domain.com

I have a wordpress website server running on linux. I have a issues when I enter docs.domain.com it opens a Test Page Test Page pic . So my target is when users enter https://docs.example.com to ...
1 vote
1 answer
30 views

Redirect removing sufixes after 3 URL segmentes in Nginx

This is the URL that I need to remove the last segment (?order=asc) https://www.example.com/segment_1/segment_2/page/the_number_goes_here/?order?asc This is the code I'm trying: location ~ ^/([^/]+)/(...
0 votes
1 answer
5k views

NginX cannot redirect to React App

I'm quite new to NginX, so my apologies if anything I ask here sounds naive. Lets say I have a DNS www.example.com. Whenever a request comes to www.example.com/ (only /), I want NginX to redirect it ...
0 votes
1 answer
46 views

Special redirect NGINX Wordpress removing last segment

I need some guidance on how to redirect this the proper way... I have a site on nginx and a bunch of malformed URL's (crawled by Search Console) that I need to redirect with 301. My CMS is Wordpress ...
0 votes
1 answer
442 views

Reverse a .htaccess redirection rule

Let me explain by example. Say, I have this redirection rule in my .htaccess file: RedirectMatch 301 ^/([^/]+)/([^/]+)/$ http://www.example.com/$2 What it basically does is, redirect http://www....
-1 votes
1 answer
112 views

nginx refuses to redirect all 404 pages to my index.html

I want Nginx to redirect all pages that are 404 to my index.html. This nginx is running as a container. Yes I have confirmed nginx is actually being reached as the docker-compose log output shows the ...
1 vote
1 answer
69 views

How to remove amp word from center of url

I removed Amp Module from our site and I need to remove amp word from center of all of urls. Using Nginx Web server for example : mysite.com/shirt/nike?amp=1&product_list_dir=asc&...
0 votes
1 answer
44 views

Is possible return a static page in https virtual host using lighttpd?

It seems like redirect is not done. If I put URL https://test2/static_page in browser it works but if I put https://test1 don't redirect SERVER["socket"] == ":443" { $HTTP["...
1 vote
3 answers
3k views

How to remove the trailing slashes from a URL with nginx

I'm trying to remove trailing slashes from urls. I searched a lot and tried some solutions but they didn't work form me. I tried this one rewrite ^/(.*)/$ /$1 permanent; but it leaves one slash ...
1 vote
1 answer
38 views

Nginx subdomain to subdomain redirect not working

The config below redirects to .another-domain.com with empty subdomain name. What am I doing wrong? server { server_name ~^(\w+)\.domain\.com$; location / { rewrite ^ $scheme://$1.another-...
1 vote
2 answers
4k views

How do I correctly implement DNS and redirects from subdomain to domain

We are updating our website (example.co.uk) part of which involves setting up 301 redirects from the old site, in the .htaccess file — which is fine and straightforward. The old site had an area that ...
0 votes
1 answer
103 views

How redirect ANY site not found in Hestia to another server - Nginx proxy manager

I want: if ANY site not found in (Hestia 192.168.0.37 server) then redirected (Nginx proxy manager 192.168.0.36) Given: Hestia server 192.168.0.37 Nginx proxy manager 192.168.0.36 Site for test ...
0 votes
0 answers
36 views

Mask Url from path to subdomain using NGINX

I want to achieve url rewrite as such: https://documentation.domain.com/login to https://app.domain.com/login https://api.domain.com/login to https://app.domain.com/login , any sudomain with url {...
0 votes
0 answers
96 views

NGINX Rewrite path to subdomain with cloudflare results in Too many redirects

I want to achieve url rewrite as such: https://documentation.domain.com/login to https://app.domain.com/login https://api.domain.com/login to https://app.domain.com/login , any sudomain with url {...
0 votes
1 answer
234 views

How can I configure Nginx to redirect all traffic to my website to the HTTPS WWW version and HTTPS version for subs with a consistent URL structure

What I am trying to do is to have some clean redirects and don't make the content from the server available everywhere like is available via https://server-ip https://non-www and https://www-version I ...
0 votes
0 answers
28 views

Nginx missing trailing slash redirects to the wrong url behind proxy

We use an nginx webserver behind an nginx proxy. When i try to browse a subpath, the nginx backend webserver (something.example.local) appends a trailing slash behind the url (301 redirect) -as ...
3 votes
1 answer
4k views

How can Nginx force browsers to disable or flush the redirect cache?

We have the following secure site. If the user opens http://name.tld, he should be redirected to https://name.tld. We initially messed up the order of the domains in the secure site, so http://name....
0 votes
2 answers
47 views

route your blog from xyz.com/blog/ to abc.com/blog/

My WordPress website domain name was abc.com (let's say) now due to a new partnership agreement the domain name is changing to WordPress xyz.com (let's say). I tried this answer https://stackoverflow....
0 votes
1 answer
1k views

Nginx redirecting www to no-www (SSL) creates not secure

I am running a Nginx server which serves my website with SSL. For SSL support I do use LetsEncrypte. My Nginx config file in sites-available is as shown below: server { listen 80; ...
1 vote
4 answers
22k views

Nginx reverse proxy too many redirections

I want to configure nginx to act as a reverse proxy that will redirect to two different Kibana hosts depending on the passed URI. / redirect to the standard and /october/ to the october dedicated ...
2 votes
1 answer
5k views

Apache (http) behind load balancer (http/https) - Redirect does not preserve https

I have two configurations - development and staging - with (supposedly) identical configurations: a set of HTTP-only Apache instances sitting behind a Citrix load balancer that allows both HTTP and ...
0 votes
0 answers
83 views

Using Rank Math REgex for subfolder redirects to home

So short summary: im a SEO specialist working on a website that has over 1000 404 pages due to a translator app. The subfolders /de/ /fr/ /es/ /en/ and URL's within the subfolder need to be redirected ...
2 votes
2 answers
4k views

any url rewrite rule causes internal server error on iis7

I have iis7 on a Windows server 2008 and iis url rewrite module 2 installed. Any url rewrite rule (in my case a simple canonical domain name rule) causes the webapp to return an error 500. In my ...
0 votes
1 answer
43 views

How to block all requests starting with "?mode" on Apache?

Recently my website was hacked and now I have around 20000 indexed links in Google that were redirected to other sites via my website. Now I have stopped all redirects but I have too many request on ...
0 votes
2 answers
42 views

Path not excluded by mod_rewrite config

I am trying to roll my own vhost config to handle certbot/letsencrypt. I want to redirect anything other than requests to /.well-known to HTTPS. But the exception for .well-known is not working; ...
1 vote
1 answer
6k views

How to redirect from one subfolder to a subsubfolder with htaccess

I have this folder structure: /fonts /myfont.eot /myfont.svg /myfont.ttf /myfont.woff /myfont.woff2 /content /page1 /files /logo.png /style.css /index.html /page2 ...
1 vote
2 answers
4k views

How to use a custom variable for the scheme in a rewrite rule in nginx

Is there a way to get nginx to treat a custom variable the same as it treats the $scheme in a rewrite rule? For instance: rewrite ^/redirect http://example.com; # and rewrite ^/redirect_with_scheme $...
5 votes
2 answers
3k views

Nginx Multiple Domains

I am trying to add a second virtual host to nginx. When i go to the new domain it redirects to the old one. I have tried restarting Nginx, rebooting the server. Has anyone come across this before, ...
1 vote
1 answer
191 views

Apache RedirectMatch not matching double slash

I want to redirect URLs with multiple consecutive slashes (e.g. //) in the path to have only one consecutive slash, e.g. https://example.com/a//b/c/ → https://example.com/a/b/c/. My .htaccess file ...
2 votes
2 answers
1k views

Do you block using your firewall or redirect bad bots hitting your server?

Tons of bad bots hit our servers every day and I have tools to instantaneously block them (i.e. modsecurity and a C++ tool of my own.) These block the bots so no data is sent back and they are banned ...
3 votes
2 answers
5k views

wp-admin redirect loop when behind apache reverse proxy

Its my first post in Server Fault, so I'm sorry for any faux pas :) Problem: When I try to access "http://dummy_server/wp-admin" that is behind an apache acting as a WAF, it gets stuck in an infinite ...
1 vote
0 answers
76 views

htaccess: I can't redirect to nested subfolders correctly on the WordPress app

I have a multilingual WordPress site that has two languages: en and tr, It's site A. I wanna put my other WordPress site inside /tr/shop/ folder, It's site B. Just need only these rules: /en/anything/...
0 votes
0 answers
38 views

The "signin-google" redirect works locally but fails when publishing the app to the server

I am trying to make Google authentication enable for my web app. It works fine locally. But after I published it into my host, it failed at the callback. I have been trying several ways for five days ...
1 vote
1 answer
4k views

Rewrite nginx rule for for a directory to another domain/sub domain

i have setup the following nginx rewrite rule . But doesn't seems to be working, * location /images { rewrite ^(.*)$1 http://sub.domain.com/$1 permanent; } * for images i'm trying to ...
0 votes
0 answers
23 views

Pass requests for specified hosts throw VM

I have VPN that restrict all internet except inner resources. I don't like it and i want to install VM, connect it to VPN and redirect all requests for specified hosts to VM and get back answer. Is ...

1
2 3 4 5
47