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

0
votes
1answer
27 views

Control redirect from a html file and not in Nginx configs

I've got a case where I need to setup a nginx server that only will serve sites (about 800) with static content. Many of the sites will initially have no real content themselves and should just be ...
0
votes
2answers
12 views

IBM Domino and variables X-Forwarded-Proto-F5 [duplicate]

Domino server receive requests with variable in header [X-Forwarded-Proto-F5]. I would like to do some tricks depends of value there (either redirect requests or not). Is it possible to do redirects ...
0
votes
0answers
14 views

.htcaccess RewriteRule without 301/302 error

I added the following Redirect-Rule to my .htaccess-file for my entire website: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([^\.]+)$ $1.php [NC,L] Basically it redirects URLs ...
0
votes
2answers
42 views

Redirect loop when forcing SSL with Nginx

I know this question has been asked and answered a million times, but none of the accepted answers are working for me. My site is unreachable due to some sort of infinite redirect loop when I force ...
0
votes
0answers
15 views

Directive of Apache - Forbidden error and redirect

I have a problem with Apache and Directory. I only want to see my site in www folder, phpmyadmin (with authorized login) and redirect from IP my VPS to doman.com. In ...
0
votes
2answers
59 views

Nginx: Redirect both http and https root to subdirectory

I'm attempting to redirect the root domain for both http and https in nginx to the same subdirectory (https): So e.g. http://example.com -> https://example.com/subdirectory https://example.com ...
0
votes
1answer
25 views

301 Redirect Root and Only Root (“/”) from https to http

I have found several Q/As on how to redirect root only, how to redirect from https to http (using .htaccess). But there was no question that merged both. And this answer is too dirty: ...
0
votes
1answer
49 views

Nginx + Wordpress: Redirect URLs after moving to Wordpress

I have a classified ads website using a proprietary script and now I am moving it to Wordpress. I want to redirect the old URLs to Wordpress URLs. The script has two main URL types: Category URL: ...
0
votes
1answer
33 views

Mass 301 redirects with Varnish

I'm working on migrating a site to another platform. We have a Python script to handle the import and we're considering using Varnish for speed. I want to make sure all existing URLs remain functional ...
0
votes
1answer
26 views

Redirecting depends of Variables in Header

Issue I've difficulties to understand if it is possible to do redirects depends of variable in Header using Domino server (R9). AIM Redirect all requests (for 1 particular website) to: ...
0
votes
0answers
25 views

Apache2 listening on https port but not responding to https request

I am trying to setup a re-direct from http to https on apache and have the following config : <VirtualHost *:80> ServerName www.mycompany.eu ServerAlias mycompany.eu ...
0
votes
0answers
34 views

How do you hide folders in IIS (hide 403 and avoid 301)?

I asked this question on http://security.stackexchange.com/ and was told to put it here We are getting ready for our pen test scan, and one of the issues we have is Hidden Directory Detection via a ...
0
votes
0answers
172 views

nginx: Redirect all requests to a proxy, but not these three specific URLs

nginx can be tricky sometimes: I want to redirect all incoming requests for www.sub.domain.com/* to www.other.domain.com/* use a proxy so users still see the original www.sub.domain.com when ...
0
votes
0answers
100 views

Redirect Loop with Nginx and Ghost

I am configuring full-site SSL for my Ghost blog. First I used Apache, then switched to nginx and the loop persists. I think this may be a rule error but unable to find it out. The config file: ...
0
votes
3answers
65 views

Nginx server redirect being ignored

I'm must be stuffing this up somewhere but can't see where. Nginx appears to be ignoring the following redirect. This currently resides in its own conf file, but I have placed it in the other files. ...
0
votes
1answer
40 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 ...
1
vote
1answer
44 views

Nginx HTML content while redirect

When the redirection is configured in nginx, the response contains: <html>[CRLF] <head><title>301 Moved Permanently</title></head>[CRLF] <body ...
1
vote
2answers
115 views

Wordpress non-www to www redirect loop in NginX

I deployed my wordpress website on NginX successfully. I need permalinks to be http://www.mydomain.com/%postname% and blog to be http://blog.mydomain.com/%postname%. It redirects all www traffic to ...
0
votes
4answers
284 views

Restrict direct IP access to website

I want to restrict direct IP access to my website. I found several solutions involving .htaccess but none work. I've also found one solution via apache virtual hosts config which was working fine up ...
0
votes
1answer
577 views

IIS 8 URL Redirect on site level

I am trying to do a simple 301 perm redirect to another url in IIS 8. The end results would be if i navigated to domain2.com i would end up on domain1.com. We are moving from IIS 6 to a new server ...
0
votes
0answers
50 views

google webmaster soft 404 on 301

I'm looking through google webmaster that my page is generating soft 404 errors (https://support.google.com/webmasters/answer/181708?hl=en) google says: We recommend that you always return a 404 (Not ...
0
votes
0answers
26 views

How do I preserve FQDN accross multiple VirtualHost using Redirect (mod_alias)?

I'm trying to use mod_alias - Apache HTTP Server Version 2.4 in order to create simple Redirect, like following: Redirect /123 http://123.%{HTTP_HOST}/123 I have several VirtualHost that are using ...
0
votes
1answer
36 views

301 redirect on same hosting server

I originally bought the domain http://example.com with a hosting package and have run a Wordpress blog on that for a while. Now I've bought an added on domain http://example.com.au and have ...
0
votes
0answers
25 views

How to make a proper permanent redirect from a domain to another domain (and hosting provider)? [duplicate]

On the forwarding side: define DNS to go to the ones of the server where the site is: dns-sampleserver.com, dns-sampleserver.org, dns-sampleserver.biz On the receiving redirection side: this ...
0
votes
2answers
379 views

cname vs 301 redirect on namecheap

I am having trouble figuring out my DNS record types. I want the www subdomain to be my "canonical" page, so my configuration looks like this: www A record type actual ip address @ 301 ...
0
votes
1answer
93 views

In Nginx, how to redirect to another domain, but to also preserve the path AND the subdomain?

So, for instance, I have a domain olddomain.com and newdomain.com Here's how I want requests redirects to work: sub.olddomain.com/hello/world -> sub.newdomain.com/hello/world ...
1
vote
1answer
107 views

Simple 301 RedirectMatch with URL input variables not working

I have this line in my .htaccess and the 301 redirect is not working. It just doesn't redirect. Can anybody see anything wrong with this? Keep in mind, I have 7 other RedirectMatch strings in my ...
1
vote
2answers
574 views

Why won't Nginx return a 404 error for URLs starting with a question mark?

I'm trying to get a rewrite rule working and I've discovered that if the URL begins with a question mark, Nginx fails to return 404 error as expected. Instead, index.html as defined in the root ...
1
vote
0answers
192 views

nginx redirects requests from apache proxy to real server address

Description: [server 1] <-|-> [server 2] [Apache] <-|-> [nginx <--> gunicorn <--> django] Apache is running on a server 1 which silently redirects just one subdomain to ...
2
votes
1answer
987 views

Nginx redirect all old domain subdomains to new one

I had a very long domain, so I decided to change it to a shorter and more friendly one. But since I have a lot of subdomains (in fact, I have a subdomain wildcard), I wanted to keep the subdomain ...
2
votes
1answer
792 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
2answers
474 views

Nginx proxy cache 301 redirects but ignore querystring

We have a lot of ad-based traffic that pass various query string params on the URL, but these do not affect the content/output of the pages. I currently have the following nginx proxy cache ...
0
votes
2answers
687 views

Why is nginx redirecting requests on port 8080 to port 80(apache)

I have a wordpress blog setup on apache2 (port 80) on Ubuntu 12.04, I also have a nginx setup listening on port 8080 serving the same blog. My problem is, whenever I try to open the blog on port 8080, ...
0
votes
1answer
82 views

301 permanent redirection changing URL structure [duplicate]

I changed category urls on site. Old are like this: www.example-name.com/category-name-exactly-same-keywords/ ...
0
votes
1answer
61 views

Rewrite rule custom 301 redirection

I have link like this: www.example.com/full-image/folder/subfolder/image-name.jpg-some-custom-keywords.html and I need 301 redirection to url like this: ...
2
votes
1answer
691 views

NGINX 301 Redirect a URL with parameters to new URL

I've deployed a site live and trying to redirect some of the original URLs to the new URLs. I'm fairly new with NGINX configuration on redirects like this. This one works: location /contactus.aspx { ...
-1
votes
1answer
103 views

HTTP 301 moved for all nginx URL to a single HTTPS

Below is a config file that I am using with Nginx to redirect all WWW and non-WWW to the https:/domain.com URL server { listen 80 443; server_name domain.com www.domain.com; ...
0
votes
3answers
123 views

nginx https 443 redirection from no subdomain to 'www' subdomain

My configuration: server { listen 80; server_name mydomain.com; rewrite ^(.*)$ $scheme://www.mydomain.com$1; } server { listen 80; server_name www.mydomain.com; return 301 ...
0
votes
1answer
682 views

Redirect to a different directory - IIS7 ASP.NET MVC web.config

We have a bunch of published URLs that reference a directory called "events" http://www.mysite.com/anniversary/events http://www.mysite.com/anniversary/events/[...] They now want to rename ...
1
vote
1answer
317 views

Nginx redirecting domain to port 8000 with a 301

I have been looking everywhere to figure out why my nginx server is causing a 301 redirect on one domain, and not the other. I have two sites configured on this server in an apache style ...
0
votes
0answers
509 views

Varnish redirect loop

I've tried with a lot of varnish configurations and always experience the same redirect loop, after varnish is running for a couple of hours some pages are displaying the message: The page isn't ...
0
votes
0answers
152 views

htaccess redirect affects bingbot, returning Redirection limit reached

Inside my .htaccess file, I have the following script: RewriteEngine on RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] <IfModule mod_rewrite.c> ...
1
vote
1answer
79 views

Nginx with ssl always returning 301

I am trying to setup nginx with ssl, to serve some static HTML and the output of some Python scripts (through uwsgi). It works fine with HTTP, but I am not able to make it run on HTTPS, as nginx is ...
0
votes
0answers
20 views

nginx redirect with entities

I want to 301 all urls that contain an entity: %B2 I have: location ~ %B2 { return 301 http://www.domain.com ; } however it has no effect, is it possible to do this with nginx?
1
vote
1answer
144 views

IIS - most efficient way to redirect many host names

I'm setting up a win 2012 / IIS 8 web server with URL Rewrite module installed to replace an existing web server. It will have 3 heavily used sites on it mapped to different domain names. ...
2
votes
2answers
245 views

Use subpath internal proxy for subdomains, but redirect external clients if they ask for that subpath?

I have a VirtualHost that I'd like to have several subdomains on. (For the sake of clarity, let's say my domain is example.com and I'm just trying to get started by making foo.example.com work, and ...
2
votes
1answer
75 views

nginx - which way is better to redirect and why

I want to redirect from www.mydomain.com to domain.com in nginx. I search the internet and found two ways: First way server { listen 80; server_name www.domain.com; ...
-1
votes
1answer
158 views

http:// to https:// Redirection with page reload in Apache 2 (HD Web Hosting) [duplicate]

I'm trying to check to see if the address accessed is using a secure connection when accessing a certain page, or not. If not, I want to redirect the traffic to the proper https:// address. I have ...
0
votes
1answer
91 views

Efficient 301 redirects in Apache (www to non-www and vice-versa)?

I came across an article titled "Efficient 301 Redirects." For example, if you are trying to redirect your site from www to non-www domain, the article suggests that when compared to this ...
0
votes
1answer
531 views

how to stop htaccess URL redirect loop [duplicate]

I am new to htaccess. so when i want to do a url redirect using htacces, i always get a redirect loop, and don't know how to fix it. I have been searching on the web but coundn't find a solution for ...