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

learn more… | top users | synonyms (1)

0
votes
1answer
26 views

Is there a way of writing cleaner rewrite rules if you've a large number of redirects to implement

I recentley completed a project whereby I moved a pretty large website to a nice clean smaller website. What this meant was I had to account for a large number of pages that had been indexed by search ...
2
votes
1answer
3k views

301 redirect Rule For Load Balance F5 BigIp

I have a load balancer F5 Big ip for my website. Currently, I am having 302 redirect in place; however, I wanted to apply 301 but dont know how. For example: My website (abc.com) when typed 302 ...
-1
votes
1answer
29 views

Redirect old domain to new domain with full path

I've very little knowledge in this area - hence the question... I'm looking to do the following: I currently have a server with a number of websites listed in sites-available and sites-enabled. There ...
2
votes
1answer
3k views

nginx return 301 / redirect

among all 'redirect in nginx' questions I couldnt find how to redirect (using return 301 and beteer no ifs) using regexps. I have a link to my website and I'd like to remove parameter a the end: ...
0
votes
1answer
22 views

Nginx Redirect depending upon user input with POST requests

I have two Data centers and within each there are multiple servers and database servers. These servers are hosting specific of some company ID's. I want to redirect my users depending upon the ...
0
votes
0answers
8 views

How to redirect everything to https with www? [duplicate]

I am using the following code in my .htaccess file RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$ RewriteCond %{HTTPS}s ^on(s)| RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] It ...
1
vote
0answers
33 views

redirect subdomain of old domain to directory in new domain

I would like to redirect a subdomain of an old domain to a directory on a new domain. e.g. forum.old-domain.com should redirect to new-domain.com/forum The redirection from old-domain.com to www.new-...
0
votes
2answers
838 views

301 redirect or disallow on robots.txt?

I recently asked for 301 redirection on ServerFault and I didn't get a proper solution to my problem, but now I have a new idea: use the robots.txt to disallow certain URLs from my site to be "crawled"...
0
votes
0answers
40 views

pound server listening to 0.0.0.0 causes a 301 redirect loop?

I have a pound 2.6 server in front of an apache 2.4.7 server. Both are in openvz containers in the same host and both have private ip addresses, as follows: [www.]my.domain:80 --> Internet --> ...
1
vote
1answer
39 views

.htaccess 301 redirect does not work

I have a website using PHP-based CMS system. So each page is generated dynamically, like this : http://www.shuling.net.cn/index.php?_m=mod_product&_a=view&p_id=87 Now I want to redirect ...
1
vote
1answer
27 views

301 redirect custom link

I have few thousands link like this /Gallery?cmd=viewCarGallery&carID=3747&pgID=1 Now I want to redirect them using .htaccess to another site to others link. Every will link will be ...
0
votes
1answer
23 views

Use haproxy to redirect *.domain1.com/* to *.domain2.com/*

I am struggling with some HAproxy rules for a while with no luck unfortunately. Let's say I have domain1.com and domain2.com. I want to redirect everything from domain1.com to domain2.com, including ...
0
votes
1answer
42 views

Excluding one URL from being redirected to HTTPS generates a loop with current NGINX version

I just updated my NGINX server on Ubuntu to the latest official version 1.9.15. Since then a config that I used for quite a while stopped working. In short, I redirect all traffic to https except ...
1
vote
1answer
69 views

How to forward all http requests to https without breaking letsencrypt with nginx

I'm using Nginx to serve as a reverse proxy for Rstudio server and Shiny server for the purposes of securing the connection to these services. I'm using Letencrypt for free signed certs. I have this ...
0
votes
2answers
23 views

Redirect path nginx with location

I want to implement multiple redirections, for example: I did this: location = /about { return 301 /es_CR; } And is correct but a need /about, /about-us and /about.php to redirect to the same ...
0
votes
1answer
68 views

Apache www to non-www redirect on Amazon Elastic Beanstalk

I've recently moved a simple PHP site to Elastic Beanstalk but am finding it difficult to redirect the www.example.com to example.com. It's not https which most of the suggestions I have found are ...
3
votes
0answers
35 views

301 Redirect to other domain of selected deep pages only?

would appreciate help on this i am trying to 301 selected deep pages only from one domain to deep pages on another domain. I do not wish to 301 the entire site. My questions are a) is this possible ...
0
votes
1answer
11 views

Separating Redirects from .htaccess

I'm migrating my server to a different location. I have a bunch of changed URL's (50 or so) that I need to 301 redirect to new locations. I use Apache 2.4 Is there a way to separate them from ....
1
vote
1answer
138 views

Haproxy 301 URL redirect on query string condition

Using Haproxy 1.5.12 running on Ubuntu 12.04 My website gets a lot of requests like this one: http://www.example.com/foo/bar/mypage.php?gallery=&position=3 the correct URL should be: http://...
0
votes
1answer
59 views

nginx mutiple domain with ssl and www redirection

nginx redirection is not working as expected with ssl and www redirection. I have two domains say, domain1.com and domain2.com. I need to have https with www redirection on both ie https:/www.domain1....
0
votes
1answer
62 views

Nging redirect http and https to https://domain (without www)

This is my Nginx config: upstream app_server { # Bindings to the Gunicorn server server 127.0.0.1:8002 fail_timeout=0; } server { listen 80; server_name "~^www\.(.*)$"; return 301 https://$...
0
votes
1answer
98 views

How to send a permanent (301) redirect from HTTP to HTTPS in Jetty 9

After following the suggestion on How to have Jetty redirect http to https, we were able to get our standalone Jetty deployment to redirect all HTTP requests to HTTPS. The redirect however is a 302. ...
1
vote
1answer
71 views

HTTP Redirect of Cyrillic URLs: this example works without URLs being encoded. Why?

As per the https://tools.ietf.org/html/rfc5987, HTTP header fields should be returned using the ISO-8859-1 character encoding. This applied also to the Location field used for the redirection. ...
0
votes
1answer
35 views

301 or 302 redirect for site which will have no content for a year?

I have a domain which will not have any actual content for a year or maybe more, and I want to redirect for the time being. Should I opt for a 301 or 302 redirect? The site is for an academic research ...
0
votes
0answers
10 views

Reverse proxying A domain to B, but have B be 301 redirected back to A

We have an old server say old.com, which now needs to become client-facing new.com. As such, we are using new.com to reverse proxy to old.com. This works. Clients see new.com. (Which internally is ...
0
votes
0answers
19 views

lighttpd rewrite in magento

I'm currently using below code in lighttpd.conf to redirect http to https. $HTTP["scheme"] == "http" { $HTTP["host"] =~ ".*" { url.redirect = (".*" => "https://%0$0") } } However,...
1
vote
0answers
77 views

old URLs to new URLs using nginx

I need to: replace old SEO unfriendly URLs with new SEO friendly URLs e.g. replace http://../products/?type=genre.main.key&key=DAN&title=Dance&page=1 with http://../genres/dance?key=...
1
vote
0answers
103 views

NGINX: Check if SSL (HTTPS) is available, if not, redirect to HTTP

The current config is: server { listen 80 default_server; listen [::]:80 default_server; listen 443 ssl default_server; listen [::]:443 ssl default_server; listen 192.168.0.5:80 default_server;...
0
votes
1answer
42 views

nginx - redirect domain to a different domain and specific path with hash

I'm trying to go from mynewdomain.com to mytenantsite.com/tenant.html#store/home. I have tried variations of: server { listen 80; server_name *.mynewdomain.com; return 301 $scheme://...
0
votes
0answers
139 views

How to stop nginx 301 auto redirect when trailing slash is not in URI?

Everytime I try foobar.com/test in browser, nginx seems to redirect (301) the client to foobar.com/test/ . This behaviour is unacceptable. The proxied server is a remote apache web server. I have ...
2
votes
0answers
26 views

Redirect user to an arbitrary application protocol (used by Android app)

I have an Android application that declares an intent using a in-house protocol. You can launch it by opening a webpage that contains a link to : myapplication://foo-bar I want to an URL on my ...
0
votes
1answer
372 views

How to use # in url as a redirect rule in htaccess for apache

I am having a difficult time figuring out how to have the following work: I am trying to redirect a url in htaccess I am trying to redirect from example.com/test.html to example.com/index#test I ...
0
votes
1answer
128 views

Apache: Redirect everything from www to non-www using https only (including HSTS)

My goal Everything results in https://mydomain.tld (non-www and with TLS) and HSTS works correct. I am using the certificates from LE (Let's Encrypt) and so I used their wizard to make my website ...
0
votes
2answers
280 views

Unexpected behavior with htaccess Redirect 301

I have the following in my .htaccess file- Redirect 301 / http://www.foo.com/south-carolina-real-estate/ Redirect 301 /related/aiken-sc.htm?tkn=...
0
votes
0answers
31 views

301 redirect entire domain to a single page .HTACCESS

First try: Chated for over 3 hours with an representative of one.com. Best advice they could gave me: do a metarefresh. Bummer. Second try: Options +FollowSymLinks RewriteEngine on ...
0
votes
1answer
27 views

Add a path after / to http request in HAProxxy

I am currently redirecting my users from get.foo.com to foodownload.com, and then they can click and download bar.mp4. I want before redirecting, change the path, so by entering get.foo.com, their url ...
2
votes
4answers
586 views

Is an SSL Cert needed here?

We currently have a website set to redirect to a new address (our client changed domain names, but wants the old domain to send people to the new site) in IIS 8.5 using permanant redirects found in ...
1
vote
1answer
1k views

Nginx Server Blocks: https, non-www, & non-ssl subdomain

Here's my scenario: Two sites: https://example.com http://dev.example.com Site 1 has a ssl certificate. Site 2 does not. (In other words, I don't have a wildcard ssl certificate.) Via ...
0
votes
1answer
57 views

EC2 NGINX 301 Moved Permanently

I'm managing two domains domainA.com and domainB.com on DNS Made Easy. Both domains point to the same EC2 instance. domainA had a HTTP redirection record for www.domainA.com to domainA.com, that ...
0
votes
2answers
57 views

Why rewrite(nginx) redirects with 301 code?

I have this configuration: location ~ ^/myway(.*) { rewrite ^/myway(.*)$ /anotherway$1; rewrite_log on; error_log /var/log/nginx/errors notice; } location /anotherway { ... ...
1
vote
1answer
27 views

Redirect All 404 not found links, files and directories [closed]

I have to permanently redirect around 12010 broekn urls to home page. Is there any way to redirect all 404 not found links, files and directories to home page without giving out 404 error header? I ...
1
vote
0answers
19 views

301 redirect to new domain - old address still generates traffic in analytics

I've redirected my page (both www and non-www) to a new address, using a .htaccess 301 redirect. But, I still see some move on the old addresses in Google Analytics. What can it be caused by?
1
vote
1answer
120 views

Forwarding SOAP requests

I ran into the following situation. A client provides a soap service on port 80. It's unknown how their clients access the service exactly but it assumed that they have the uris hardcoded in their ...
0
votes
1answer
15 views

Apache redirect works except for index?

I'm trying to redirect my old site to a particular url on my new site. <VirtualHost *:80> ServerAdmin info@info.com ServerName old.dev ServerAlias www.old.dev Redirect 301 / http://new.dev/old ...
3
votes
2answers
69 views

Redirect to https:// with www apache2

I am redirecting all http:// request to https:// using apache2 host .conf file like this. <VirtualHost *:80> ServerName example.com ServerAlias www.example.com Redirect / https://...
2
votes
2answers
12k views

How to redirect example.com from HTTPS to HTTP, then HTTP example.com to newdomain.com?

As of now I use this rule (in .htaccess of example.com) to redirect HTTPS/HTTP example.com to newdomain.com: Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://newdomain.com/$1 [R=301,L]...
3
votes
2answers
645 views

Redirect loop when forcing SSL on Nginx server

Lately I have been trying to redirect to HTTPS using Nginx but I keep getting a redirect loop after I try to visit my site in a browser. Here is my full server block config file: server { listen ...
4
votes
3answers
2k views

How to redirect https://domain.com to https://www.domain.com using IIS?

I have a 301 set up which redirects http://domain.com to http://www.domain.com (http://www.domain.com$S$Q) but if I browse to https://domain.com I get an SSL error (as it expects www.domain.com). Is ...
0
votes
1answer
150 views

Redirecting my site is not working

Ubuntu 14.04 and Server version: Apache/2.4.16 (Ubuntu) The redirect rule is not working or am I missing something ? When I type in the browser, I want to use https://teampass.domain.org, but ...
1
vote
0answers
24 views

sending back rewrote url without forcing a new request

The user of my application issue commands (create new post, delete comment etc.) via links with nonce parameter. As this is transported via GET the URL bar contains this technical detail. I want to ...