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 [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.

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 ...
1
vote
1answer
71 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
49 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
55 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
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 ...
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
vote
1answer
71 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
102 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
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: /...
1
vote
1answer
128 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
27 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
50 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
20 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
82 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
29 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
28 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
100 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
50 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
58 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
80 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
39 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
110 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
100 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
1k 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
36 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
58 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
490 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
21 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-...
1
vote
2answers
727 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
59 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
43 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
262 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
1k 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 ...
8
votes
2answers
10k 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
270 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 ...
-2
votes
1answer
209 views

how to redirect old html url to new php Url [duplicate]

How to redirect old html page to new php page. I used this code but it redirecting with full file path. I'm using below code. RewriteEngine On RewriteRule ^(.*).html$ $1.php
0
votes
1answer
266 views

NGINX 301 list of redirects SEO

I have about 250 URLS that need to be redirected from an old site to new. In the server block I set this statement: include /etc/nginx/301s/somesite.conf; Then in the included file I have a list of ...
0
votes
1answer
108 views

Unwanted 301 Redirect for new VirtualHost for subdomain

For the last 3 years I've had 2 copies of my Wordpress website. One at www.domain.com and one at dev.domain.com. I'm trying to add a third today. Seems simple enough! I go through all the simple setup ...
0
votes
1answer
1k views

Redirect naked domain to www with SSL in cloudfront/route 53

I have setup two buckets on s3 one for my actual angular 2 app: www.example.com and one for redirecting example.com to www.example.com. I have also created two distributions in cloud front and added a ...
1
vote
1answer
1k views

CNAME redirect to external https url

I have a somehow specific setup. It really is due to some restrictions I cannot work around: There are domains 1. and 2. which I own and an external URL which I don't own: start.com root.com http://...
1
vote
0answers
43 views

How to 301 redirect piece by piece?

I will move my blog website (monthly traffic of 250k) to a new domain name. I will use HTTP 301 redirections. But I should not redirect all links at the same time because of some business reasons. I ...
1
vote
2answers
548 views

NGINX - return 301 keeps redirecting to HTTP instead of HTTPS

I have the following configuration: server{ ssl on; listen 443 ssl; ... location = / { return 301 https://$host/appName; } location = /appName { ... proxy_pass $...
0
votes
0answers
29 views

IIS redirect to HTTPS folder

I am trying to figure out redirection on IIS. I have a website that should be viewed under https://foo.bar.com/Web The HTTP to HTTPS redirection part is easy but entering https://foo.bar.com/ shows ...
0
votes
1answer
119 views

dual behaviour on passing referrer between http and https with 301 redirects

We have a client that is using https but has two 301 redirects, first redirect from https to http, and second from http to https. One of his referrers is sending from https referrer to https but the ...
1
vote
1answer
701 views

nginx won't redirect http to https

I have a nginx docker running, with multiple site-config files. One of those is just a general redirect for all http connnections to https: server { listen 80; server_name *.example.com example.com; ...
0
votes
1answer
191 views

IPTables Forwarding Port 8080 to 80

My hardware firewall has port 8080 open My goal is to have my server receive the requests over 8080 and via iptables route the request to be handled by httpd. This seems simple (in my head), but I ...
0
votes
1answer
58 views

Leverage 301 HTTP code for email address migration

Is it possible to leverage HTTP 301 Moved Permanently for email address migrations to ask the sender to sender the further messages to another email address? UPDATE I'm aware of differences between ...
0
votes
0answers
181 views

Trouble redirecting https://example.com to https://www.example.com on an nginx server

I'm pretty to new to this and hence I request you to bare with me on this one. And trust me, I wouldn't generally post questions until I've truly spent hours and hours on a problem without having any ...
1
vote
1answer
85 views

How to check is canonicalized domains are being used? Apache 301 redirect does not preserve referrer

I have multiple domains which are setup to redirect (301) to my main domain. However I know some of these domains have little to no value in terms of SEO and I would like to get rid of them. But a ...