Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [redirect]

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

0
votes
0answers
2 views

Asp.net URL Redirect not working though test is passing in IIS

Blockquote I have asp.net web application and added a entry for URL Redirect. I tested the URL redirect in iis and the test gets passed. Here is the URL redirect rule I am using. <match url="(.*)...
0
votes
0answers
28 views

Is there any way to redirect access if proxy cache is not hit on nginx

I'm using nginx with proxy_cache. And I'm looking for the way how to redirect to upstream servers if proxy_cache is not hit, to save proxy server outbound traffic. If cache is there, return cache. ...
0
votes
0answers
31 views

Redirect URL with a subsequent direct URL as parameter has wrong port via nginx proxy

I have an existing service (MyApp) for which I wish to put an nginx proxy in front of. MyApp is directly accessible via: https://host123.example.com:8080/ The URL to access via the nginx proxy is: ...
1
vote
1answer
23 views

Mapping Old to new URL is not working in Nginx

I am moving my old Url's to the new one (it is more than 50) so I have placed the URLs in a file but the redirection is not happening. map_hash_max_size 262144; map_hash_bucket_size 262144; map $uri ...
0
votes
0answers
36 views

How to use socat to a dynamic IP

I'm using socat to redirect TCP traffic to my home from a server. The problem is that my home changes IP every day. If I start socat with a url, it'll not update after some time, it'll just use the ...
0
votes
1answer
37 views

Nginx redirects all websites to another website

I've been facing some weird issue. I have 2 WordPress websites installed on my server. I will call them, example1.com, example2.com All 2 websites run on Nginx, PHP-7.2, MariaDB and Ubuntu 18.04. ...
-3
votes
1answer
29 views

Redirect DNS to specific path

A given client needs to point a domain to my IP address. The problem is that when accessing through this subdomain it needs to "drop" at a certain URL. For example: sub.domainofmyclient.com => ...
9
votes
1answer
317 views

Nginx simple redirect of products from old to new category

I'm making redirects of products from old to new category. I've managed to make it work with following rule: rewrite ^/old-category/(.*) /new-category/$1; But I want to know when should I use "end ...
1
vote
1answer
27 views

Nginx: redirect non-www https to https://www

I'm having some issues when trying to redirect https://example.com to https://www.example.com. It simple gives me a redirect loop. This is my site's nginx configuration I had prior to the changes I ...
0
votes
0answers
28 views

Nginx redirect without using a port

I am using a nginx to redirect from several http services with IP:PORT to a https domain. Now I need the nginx to redirect only: http://IP to https://DOMAIN and open it in Browser with: https://...
0
votes
1answer
105 views

nginx “ERR_TOO_MANY_REDIRECTS” after add ssl

After i add Let's Encrypt certificate to my website with CertBot i get ERR_TOO_MANY_REDIRECTS when i try to visit the domain of my website. some info : -mywebsite build with django, nginx and ...
0
votes
1answer
28 views

Add or do not add WWW hostnames to SAN certificate

My setup is as follows: 100+ websites Each website has two host headers any.com and www.any.com Requests for www.any.com are redirected to any.com without changing protocol Some of these websites ...
0
votes
1answer
40 views

htaccess: How to redirect to 404 if url parameter is missing or invalid?

Assume the following folder structure on the webserver (Apache): https://somedomain.com/parentfolder/childfolder. Using .htaccess, I'd like to display the childfolder and any of it's children (files ...
1
vote
1answer
18 views

Apache Rewrite not working

I have a very strange thing happening in my apache2 setup. I just want to redirect HTTP to HTTPS. I have tried all possible ways, like this: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?...
0
votes
1answer
39 views

F5 BIG-IP monitor to detect http to https redirects

We have an F5 BIG-IP load-balancer we use in front of a web application hosted by several identical servers. The application listens on port 443 for SSL/TLS requests and port 80 for http request. ...
0
votes
0answers
29 views

www redirection sends to the wrong vhost

I've got a VPS setup with apache and a few websites on it. DNS wise, I've got it like so: mainsite.com. -> A -> 1.1.1.1 www.mainsite.com. -> CNAME -> mainsite.com. secondsite.com. -> ...
0
votes
1answer
26 views

How to point one domain to other domain

We have one site www.abc.com which is hosted on server A and a redirect has been set up on this server which redirect this site to www.xyz.com/reports. www.xyz.com is our sitecore site and having one ...
1
vote
1answer
101 views

Why are Apache Rewrite Conditions not working?

I tried to perform a redirect writing in .htaccess file: RewriteEngine on RewriteRule article-1 www.another-site.com/article-1 [R=301,L,NC] and it works correctly. Anyway, when I add a rewrite ...
0
votes
1answer
31 views

Same nginx default file works on one server, but not the other?

I am trying to write a "catch all port 80 and force 443" for various different domains and sub-domains that we have. For this I am trying to use a wildcard like so: server { listen 80; ...
0
votes
0answers
258 views

How to redirect non-www https port XXX to www https port XXX using nginx?

The Nginx sites-available file is given below. We've managed to redirect non-www http to www https on port 80. (http://example.com --> https://www.example.com) We've managed to redirect non-www ...
-1
votes
1answer
67 views

domain name to virtual directory IIS

Our company hosts our own website on a leased server (windows 2012 R2) To access it, we can use the IP (http://159.68.xxx.xxx) or the domain name we purchased (www.example1.com), which is simply a ...
0
votes
0answers
40 views

Serve content from a port like a Apache2 directory

I have a Node.js/Express website running by port 3000. I would like to serve it as a land page of my server by the root (/) not using the port. I have a few limitations as I have also in the same ...
8
votes
1answer
639 views

HSTS and double redirect

I manage a little website in a shared hosting LAMP environment: this basically means the only thing I can edit is an htaccess file. I wanted to add HSTS support (and I did it), but, when I tested my ...
0
votes
1answer
37 views

IIS connection reset after redirecting http to https

I'm getting a connection reset error in browsers when I redirect a URL from http to https. I'm trying to locate the issue and have looked in C:\Windows\System32\LogFiles\HTTPERR and see only ...
0
votes
0answers
43 views

NGINX - Cookie Redirect / Path Rewrite

I have the following within a server block, however it seems to cause Error 500: location ~* ^/posts/(.*) { set $thepath = $1; if ($http_cookie ~* "locale=1") { return 301 https://...
0
votes
1answer
34 views

Nginx HTTPS redirect loop with multiple domains

I know that there are other questions with similar topics, but I can't find a solution anywhere that solves my specific problem. The difference here is multiple domains with different sites. I have ...
-1
votes
3answers
45 views

Apache Virtual Host redirect from https subdomain to subdirectory

How do I redirect requests coming to https://blog.example.com to https://example.com/blog? Reading the apache docs on when not to use the rewrite mod, I tried a simple redirect e.g. Redirect https://...
2
votes
1answer
25 views

Nginx - Redirect old links

Let's say that i have thousand of old links that i want to redirect, all old links are like mydomain.com/1234-article-slug-name and the new links are like mydomain.com/article-slug-name. I want to ...
0
votes
1answer
63 views

Using mod_rewrite to redirect single pages

The first requirement was to redirect traffic from http://www.old-domain.org to https://example.press -- but only do so for the root of the domain; any specific page should be available on the old ...
0
votes
1answer
33 views

nginx URL Redirect

Excerpt from conf file server { #HTTP SITE listen 80; server_name example.tv www.example.tv; #Redirect HTTP to HTTPS location / { return 301 https://example.tv$request_uri; ...
0
votes
0answers
25 views

Redirect non-www and https non-www to https-www domain without .htaccess

I am trying to redirect every non-www http and https request to https://www... request. I'd like to do this without .htaccess file (since it is a simple redirection). Here is my vhost configuration [...
0
votes
1answer
21 views

IIS and Apache rewrites and redirects working together

I'm having some trouble with IIS and apache working on the same server. Specifically, any redirects that apache does don't replace the website domain with the target domain. Here's an example: Trying ...
0
votes
1answer
75 views

Autodiscover 404

After much research and testing, I have implemented the redirect rules to have autodiscover check elsewhere than on my web server. With this post, I am trying to figure out what may be wrong (could be ...
0
votes
0answers
25 views

Nginx default_server matches everything

In my Nginx configuration I have three separate sites under different subdomains each with an exact server_name match. My problem is that other subdomains also redirect to these subdomains, which I ...
1
vote
1answer
57 views

.htaccess 301 redirect remove [] from the URL

I want to remove '[' and ']' from the URLs and redirect to correct link. Here is a sample URL: /forums/garage-150/cool-cars-sightings-[archived]-7610/index127.html Needs to be redirected to: /...
0
votes
0answers
129 views

Apache redirect from http to https - SSL handshake failed: HTTP spoken on HTTPS port

I have Moodle (elearning system) web application installed on Debian 9 with Apache web server. It is a bitnami appliance, but the only difference is the folder structure. I configured redirection from ...
0
votes
0answers
56 views

Redirect for non-www to www not working for https

I am attempting to redirect all non-www requests to www with my nginx server, but despite successfully redirecting the http request (http://example.com to https://www.example.com), the https request ...
1
vote
1answer
39 views

Redirecting all pages to another domain using htaccess

I am trying to redirect all traffic to my site from a country to a sub-domain. I am using the following method to redirect the traffic. RewriteEngine on SetEnvIf CF-IPCountry "(.*)$" Country=$1 ...
2
votes
0answers
34 views

NGINX - My site has a webmail subdomain even though I never set one up. How do I redirect all webmail.domain.com requests to www.domain.com?

I have multiple nginx sites running on a Digital Ocean droplet. I've installed postfix as a relay to G Suite Gmail. I only access my email through Gmail itself. So I don't need webmail. Nor have I ...
0
votes
1answer
68 views

Redirect from http to https stopped working after update of Moodle

After Moodle elearning system update, the redirection from http to https is not working anymore. Environment: Debian 9, Bitnami Moodle appliance, Apache web server Port 80 and 443 are opened in ...
0
votes
1answer
85 views

Redirect root domain only, but keep some subdomains pointer to original root domain

I have the following config: Type Name Value A @ 192.0.2.123 A www 192.0.2.111 CNAME test @ CNAME mail @ Is it possible to temporary redirect the root domain ...
1
vote
2answers
122 views

Dirty redirects in .htaccess

text/x-generic .htaccess ( UTF-8 Unicode text ) RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # BEGIN WordPress <IfModule mod_rewrite.c> ...
1
vote
0answers
263 views

IIS 10 URL Rewrite HTTP to HTTPS redirect on same port

I would like an easy redirect but doesn't work. Original: http://exwebsite.com:8084 to Redirect: https://exwebsite.com:8084 Can u help me? The simple <add input="{HTTPS}" pattern="off" /> and ......
-3
votes
1answer
255 views

How to redirect from port 80 to port 8443 using Tomcat and iptables

I have the following iptable entry: REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 8443 In my server.xml, I have only the following connector: <Connector ...
2
votes
0answers
37 views

HTTPS redirect, exclude script parameters from URL [closed]

My goals: 1. http://example.com/page/index.php -> https://example.com/page/ 2. http://example.com/page/ -> https://example.com/page/ 3. http://www.example.com/page/ -> https://example.com/...
1
vote
1answer
250 views

Apache: Redirect all .html AND .php requests to folder + WordPress

After a relaunch I have a bunch of dead backlinks pointing at URLs with .php or .html file-extensions. It would be nice to redirect them in bulk using .htaccess and the mod_rewrite module. The ...
1
vote
0answers
21 views

301 redirect on IIS with optional query string

I have a working 301 redirect setup for languages that looks like this: <rule name="mygreatrule" stopProcessing="true"> <match url="^productname" /> <conditions logicalGrouping=...
2
votes
2answers
76 views

Redirect https://www to https:// [closed]

I use this RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ https://kanzan.se%{REQUEST_URI} [L,NE,R=301] to redirect ALL www to non-www, but it ...
1
vote
1answer
55 views

Nginx htaccess for query string in redmine

this is a question from Does not work nginx htaccess for special page in redmine I am repeating: I have system of management of projects redmine. Also, i have nginx, like reverse proxy for redmine. ...
0
votes
1answer
172 views

URL redirect to port [closed]

I currently access a hosted site at this URL: http://10.1.1.165:3013, but I would like to access it like http://10.1.1.165/m2m. How can I do this? I have installed the HTTP Redirect Module and tried ...