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 ...
-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 ...
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
0answers
41 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
40 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 ...
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 ...
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 ...
1
vote
1answer
71 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
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 ...
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
36 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
147 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
63 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
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....
1
vote
1answer
74 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
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
82 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=...
0
votes
1answer
101 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
0answers
106 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
44 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
146 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
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
32 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
135 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
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
589 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 ...
0
votes
1answer
58 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
58 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
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
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
1answer
128 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
659 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 ...
0
votes
1answer
154 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 ...
0
votes
0answers
7 views

Apache Rewrite, add www and trailing slash to only Server Aliases That dont have it [duplicate]

I have a domain that has a number of domain aliases. Using Apache I would like to add 'www' to an alias that does not have a www preceding as well as add a trailing slash only when visiting the base ...
1
vote
1answer
26 views

multiple redirects on lighhttpd

I have a request to redirect multiple individual URLs to new individual URLs. This is the situation: **Old URL --> New URL** old.domain.org/ --> ...
2
votes
1answer
90 views

htaccess - redirect based on the request origin

Please help me out here. I would like to use .htaccess to redirect based on request origin, for example: User requests: http://www.domain.com/subfolder/ And should be redirected to: http://www....
0
votes
1answer
58 views

Nginx pass proxy example.com/test/app

I am trying to configure Nginx as a proxy to http://example.com/test/app My config is similar to this : server { listen 80; location / { proxy_pass http://example.com/test/app; }...
0
votes
0answers
73 views

redirect time too high! from non-www domain to www.domain

I have setup canonical redirects in my nginx config file, however it takes 7sec to redirect mydomain.com to www.mydomain.com (from firebug) this is my chunk of config: server_name example.com rewrite ...
-2
votes
1answer
141 views

How to rewrite URL by removing the last two characters within the htaccess file?

How to rewrite a URL by removing the last two characters within the .htaccess like following? /blog/?m=20150218 rewrite to /blog/?m=201502 I have tried for following but not working: RewriteCond %{...
0
votes
1answer
99 views

Unexpected Redirect in Nginx and php5-fpm

Not too experienced with web hosting, but I wanted to set up a wordpress site, but was having issues with an unexpected redirect, so I purged my entire nginx configuration, but still getting the ...
1
vote
2answers
146 views

nginx 302 redirect only naked IP

I'm trying to setup a 302 redirect if someone enters the IP address, but 301 all other requests to the www.subdomain of that domain. server { listen 198.251.86.133:80; server_name 198.251.86....
-2
votes
1answer
60 views

How to redirect from one URL to another

I had a site running with url "http://domain-a.com". Now the server running that site is decommisioned and all the contents are moved to another site with url "http://domain-b.com". What I want is, ...