Stack Exchange Network

Stack Exchange network consists of 175 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 [301-redirect]

The HTTP response status code 301 Moved Permanently is used for permanent redirection. This status code should be used with the location header.

0
votes
0answers
13 views

301 redirect configuration in apache2

I have an apache2 running on an Odroid XU4, and I've managed to configure port redirects, Dynamic DNS and HTTPS using LetsEncrypt. Right now I'm using a DDNS domain from a free service (xxx.ddnss.de),...
1
vote
0answers
16 views

AWS S3 + Route53: Always redirect to www prefixed domain [duplicate]

I have a domain: example.com. I've created an A record for www.example.com with an alias targeting the load balancer’s DNS; this works just fine for www.example.com. Now, I want to redirect all ...
0
votes
1answer
38 views

Redirecting HTTPS

We built a site for a client to advertise a new block of apartments they had built. The apartments have now all been sold so we have been asked to forward the domain to another domain until there is ...
0
votes
1answer
27 views

.htaccess throw 404 and then 301 on nonexistent path

Currently I have this set up in my .httaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !\.(php|html|txt|js|css|png|jpe?g|gif|svg|woff|ico|csv|xml|pdf|gzip) RewriteCond %{...
1
vote
1answer
55 views

Virtual hosts on Apache not applying 301 redirect

I have a Ubuntu 18.04 server on an Amazon EC2 instance running Apache 2, with an SSL certificate installed, which I use exclusively to host virtual hosts for .tld variations of the policymakr.com ...
0
votes
0answers
37 views

Nginx redirect multiple query string urls

I want to redirect some URL to another folder on the same website. Each URL have query string so simple 301 return is not working. Example of redirect I want. example.com/th/?n=abc 301 to example....
0
votes
0answers
45 views

URL redirection and ACL conditions in Haproxy

I would like to check and compare the maxconn and conn_cur in haproxy. If the conn_cur value greater than maxconn, the url needs to be redirected. URL redirection is working, but the maxconn & ...
1
vote
1answer
52 views

How to debug big redirect chain in nginx. Unexpected redirect

I have a task to make a large site migration now. And i have a large number of redirects in config. But I cannot understand why one redirect causing second redirect in chain. Even if any other ...
0
votes
1answer
37 views

nginx server configuration to redirect all requests to ssl without subdomain

I want to redirect all requests to example.org. I created a configuration file as below. I can redirect the requests from : http anything.example.org to https example.org https anything.example.org ...
0
votes
0answers
55 views

Nginx Redirect Loop in a Letsencrypt Docker with Multiple Sites

I am getting a "too many redirect error" when I try to go to my own websites. Those websites are hosted on my server with Nginx inside a Letsencrypt Docker(Docker Hub: https://hub.docker.com/r/...
0
votes
1answer
30 views

NGINX: Cannot config nginx to handle redirect from HTTP to HTTPS redirect not working

I have try to config nginx: /etc/nginx/nginx.conf server { listen 80 default_server; listen [::]:80 default_server; server_name 10.0.0.10; #This is my private IP return 301 https://$...
0
votes
0answers
18 views

Apache HSTS with non-www to www 301 redirect

Just been setting up HSTS on an Apache vHost (it is a virtualmin box) and have that working, however I am experiencing strange behavior when trying to force a call to https www rather than it ...
0
votes
1answer
83 views

SSL Certificate, Redirect, No-www done right (apache)?

MY GOAL I would like to make a website accessible only via SSL (encrypted) and with many domains redirecting to only one master domain (no duplicate content) and all www variants should be no-www. ...
1
vote
0answers
66 views

Removing nginx server_name results in too many redirects

I'm trying to test out a new website before replacing the original one, since I don't want to impact users. I have an existing website at say example.com and am working on a separate WordPress site ...
0
votes
1answer
131 views

NGINX SSL “ERR_TOO_MANY_REDIRECTS”

I have website build with django and nginx. After adding Let's Encrypt SSL certificat using Certbot I get the error : ERR_TOO_MANY_REDIRECTS. Please find the below nginx configuration : server { ...
1
vote
1answer
158 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 ...
1
vote
1answer
320 views

Editable URL Rewrite Map for CloudFront/S3 Website using Lambda@Edge

I'm migrating a static website from IIS to Amazon S3, using CloudFront for https. The old site used the URL Rewrite module and had 301 redirect maps with over 200 entries. Here is an example: example....
0
votes
1answer
75 views

Redirect with space character for file download

I have this in the .htaccess file: Redirect 301 /product-installer https://download.testsite.com/installers/My%20Product%20v3.0.0.0.exe It's working correctly of Firefox as when you click the URL ...
1
vote
1answer
228 views

301 Redirect all child pages to parent page with the exception of a few child pages to other pages throughout the site

How would I go about 301 Redirecting all child pages to the parent page with the exception of a few child pages 301 Redirected to other specific pages throughout my site. Below works for redirecting ...
0
votes
1answer
58 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
vote
1answer
183 views

redirect dynamic url to subdomain

I am trying to redirect the URL to the corresponding subdomain. For example: example.com/account/user example.com/account/user2 to user.example.com user2.example.com I have tried: Redirect /...
0
votes
2answers
340 views

Unable to remove 301 redirect for wordpress wp-admin on nginx

Unable to remove 301 redirect for wordpress wp-admin on nginx. The homepage seems fine I’ve tried almost everything Disabling plugins by renaming the plugin directory Removing the ...
1
vote
1answer
70 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: /...
1
vote
1answer
249 views

Apache Redirect to /index.php - How to handle direct requests for /index.php

I'm not 100% sure if this should be on server fault or stack overflow, though I'm leaning towards server fault. Most PHP frameworks utilize Apache redirects to funnel all request to /index.php and ...
0
votes
1answer
90 views

How to redirect all requests except when there's an exact string match

Requirement- I want to redirect all requests that end with /abcd to /products/abcd This should match all urls such as these- /collection/abcd /collections/all/abcd /hello/world/abcd This is what i'...
0
votes
1answer
56 views

Apache: Is the password protection in a .htaccess file always processed first?

Last week I did a relaunch on a website and today I have realized that the staging subdomain got indexed by Google. I want to avoid this mistake in the future and track down the error source. I ...
1
vote
0answers
77 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=...
0
votes
2answers
88 views

How to certify a domain that's used only for redirections and has no hosting?

I migrated a site from oldsite.example to newsite.example. HTTPS was enforced all over, so most incoming links to oldsite are going to https://www.oldsite.example. My oldsite.example domain used to ...
0
votes
1answer
36 views

NGINX configuration for creating a shortlink service from existing shortlink web service

I have an existing shortlink service with long domain name longname.com/Wsdfsdf . When the visitor clicks this link it redirects to longname.com/order-details/customer-id/3435345345435 Now I have a ...
0
votes
0answers
62 views

Linode Longview Apache https Redirect

I have setup Linodes longview (which is used to view your servers information from the linode dashboard). All is working apart from the Apache tab, which gives the following error: Unable to access ...
0
votes
2answers
213 views

Redirect root to www nginx on HTTPS

Here is the current status: http://example.com to https://www.example.com works http://www.example.com to https://www.example.com works https://example.com to https://www.example.com DOESN'T redirect ...
1
vote
1answer
68 views

Redirect with query stings

I have a very annoying redirect I cannot figure out. I have many hundreds of page like the below: example.com/directory/in.php?url_id=28930 I want to redirect all e.g. /directory/in.php?url_id=...
0
votes
1answer
110 views

How can I bootstrap certbot on a hard-redirecting https domain?

I have a working Nginx config that: Performs a hard-redirect (301) from http to https Additionally, ignores subpaths on http (http://www.example.com/ANY/THING redirects to plain https://example.com) ...
-2
votes
1answer
88 views

Redirect my https://123.456.567.789 to https://example.com || Nginx [closed]

I want to create redirection rule for my site, i want to redirect my site from ip to domain, but its working fine in non-https , but when i type https://id-address it opens as it is, no redirection. ...
0
votes
1answer
40 views

Trying to forward an HTTPS URL to another

The domain ultimateedgeapparel.com is registered on GoDaddy and I've setup a 301 redirect through GoDaddy's forwarding service to this page - https://www.allvolleyball.com/ultimate-edge which works. ...
0
votes
1answer
288 views

Nginx server redirect loop after SSL

So i've had some problems getting SSL to work on my Nginx server. After some time trying and following tutorials i've finally got it to work. Then when i wanted to access the hipchat server i got ...
1
vote
2answers
126 views

apache2 mod_rewrite redirect without http body [duplicate]

I am currently using Apache mod_rewrite to redirect to HTTPS, but I would like to remove the body from the response. How it is currently: Example: How I would like it to be My redirect ...
-1
votes
1answer
2k views

Apache Rewrite redirect all pages except for specific [duplicate]

I am retiring a site and would like to display a message when anyone tries to access any page on the site EXCEPT for a couple of pages. Some pages have certain pageid parameters. So basically ...
0
votes
0answers
57 views

map setting is not working for redirect in nginx

I have redirect-map.map file which has some url to redirect as below but redirect setting is not working: /jewelry/test/costumes(.*)a1 https://test.com/jewelry/test/costumes.html; /jewelry/test/...
1
vote
0answers
83 views

Is there a way i can track which IIS server redirects are being used

Our web.config file has 1300 redirects in it and growing all the time. Its a mixture of 4 site rebuilds over 15 years and marketing vanity URLS. My question is 3 part. does having to search through ...
0
votes
1answer
1k views

Nginx 301 domain redirect not working

I am trying to redirect (or I guess forward) my old domain (example.com) to my new domain (example2.com) now that I have updated my server config to accommodate the new domain. However, it doesn't ...
0
votes
0answers
10 views

Redirection htaccess code headache

Can anyone help me figure this out? I want to re-direct my example.com & example.com/index.html & http://www.example.com to https://www.example.com I tried this code but I think it's re-...
1
vote
0answers
25 views

Apache settings to prevent browser from redirect

I have a question regarding redirects. We currently have set up an Apache with a wildcard certificate *.shopdomain.com and run different shops on different subdomains like shop-a.shopdomain.com, shop-...
2
votes
3answers
1k views

How to redirect specific pages in htaccess, and all other redirect to the homepage?

How do I 301 specific pages to a new domain URI, and then all the rest of the pages, just send to the homepage? Example -- Specific pages I want to move -- Redirect 301 /contact.htm https://...
0
votes
1answer
69 views

Google Compute resize gives: HTTP/1.0 301 Moved Permanently

I recently installed a Wordpress instance on Google's Compute Engine with Google's own one-click install button. It doesn't let you configure the server or OS so I just took what Google offered (...
3
votes
1answer
44 views

Apache htaccess redirect?

I have a client who has a domain like this-site.com and also thissite.com Without going into the entire issue behind it, we need to redirect any incoming request to any *.this-site.com to the matching ...
1
vote
1answer
323 views

nginx and redirection from another domain

So I have www.old-domain.com and we've just transferred to www.new-domain.com old-domain.com's server had an SSL certificate and could handle both http://www.old-domain.com and https://old-domain.com ...
1
vote
1answer
2k views

.htaccess redirect all domains, with paths, to one

I have three domains all pointing to the same hosting space, mirrored using A records: example.org example.org.uk example.co.uk I have a website on the root (/), and a MediaWiki installation at ...
13
votes
2answers
24k views

Best way to redirect all HTTP to HTTPS in IIS

We want ALL sites on our webserver (IIS 10) to enforce SSL (ie redirect HTTP to HTTPS). We are currently 'Requiring SSL' on each site and setting up a 403 error handler to perform a 302 redirect to ...
1
vote
0answers
319 views

Windows web config redirect, different folder name and domain

I have 2 websites and a few thousands links with the same pattern that need to be redirected. I want to achieve this by writing the code one time and for it to work for all of the URLs. This is the ...