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
votes
0answers
12 views

Prevent iframe URL redirection in .htaccess

I am surviving from .htaccess 301 redirection issue. I need to redirect my my.domain.com/direcoryname urls to my.domain.com. It is working by Redirect 301 /directoryname my.domain.com/directoryname. ...
0
votes
0answers
16 views

IIS 8 Win 2012 R2 - Rewrite redirect not working, page not found, address not changing

I have an MVC4 app and trying to rediret pages so that both http://example.com/about and https://example.com/about direct to https://example.com/about (where about could be any other page also). I ...
1
vote
1answer
48 views

Getting “Too many redirects” error with nginx rewrite rule

I am trying to rewrite the domain url that targets my site such that all domain names are rewritten to www.example.com and have the following config: mysite block server { listen ...
-2
votes
0answers
11 views

Apache VHost/Rewrite rules [duplicate]

pretty new to Apache and rewrite rules so please be patient. I would love some help to find a rewrite rule to redirect a domain and all folders to a new domain and folders... Not explaining well so if ...
1
vote
1answer
64 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 two does not. (In other words, I don't have a wildcard ssl certificate.) With ...
0
votes
1answer
48 views

nginx redirect loop with proxy_pass and $http + CloudFlare

My nginx configuration works great until I add a redirect that forces HTTPS. The working config before the redirect is is: server { listen 80; listen 443 default_server ssl; server_name ...
1
vote
2answers
48 views

Can I make Apache ErrorDocument return 404 instead of 301?

In my .htaccess I have ErrorDocument 404 http://foo.com/404.html It works, in the sense that I recover from any file not found error and show the 404 page instead, but the way it works is to ...
1
vote
1answer
37 views

nginx 301 redirects not working as expected

I have added the following rules to my nginx.conf file rewrite ^/top100/Armin%20van%20Buuren/(.*)$ http://www.example.com/armin-van-buuren/$1 redirect; rewrite ^/top100/armin-van-buuren/(.*)$ ...
0
votes
0answers
27 views

Enable charset header in nginx 301

I have nginx redirecting http requests to https. Currently the header in the redirect is Content-Type: text/html. I want it to be Content-Type: text/html;charset=utf-8. Here it says I need a custom ...
0
votes
0answers
30 views

<SOLVED>IIS7 HTTP Redirect not working correctly for my use

quick overview of our network. One WAN IP, two win 2k8 web servers. Initially one was for our public sites, the other was for our internal sites. Using a router as a firewall / NAT device. We now ...
0
votes
1answer
50 views

Domino SSL 301 redirect with www and non www

With reference to this question How to do a 301 redirect from http to https in a domino server? My redirects are failing. (gaps between protocol and : are because i dont have the rep to post multiple ...
0
votes
1answer
110 views

nginx: Multiple cross-domain 301 redirects with different page addresses

I'm moving my old site over to a new domain, and with that new domain comes new naming conventions. I'm trying to figure out what would be the simplest way of accomplishing the following for roughly 8 ...
0
votes
1answer
26 views

How to use parts of the old URL in a 301 redirect [duplicate]

is it possible to keep certain parts of an URL and to rewrite the rest? With a .htaccess 301 redirect. In my example I would like to rewrite URLs from this format http://blog.example.com/post-name ...
0
votes
0answers
17 views

Redirect an old existing opencms url to new joomla url

I am currently working on redirecting the old url of one of our opencms site to the new url which is in the joomla platform. I've been trying for some time now but I can't seem to get it. I have tried ...
1
vote
1answer
229 views

302 redirect loop with nginx and Wordpress

I've been searching a couple of hours in Serverfault trying to solve this problem but I can not find a solution. What happens is: I am having a 302 redirect loop using wget in my site, but not using ...
0
votes
0answers
22 views

Permanent redirect from machine behind load-balancer

I suppose you've seen questions about Google indexing both the domain name and IP address of a site. I have a similar problem, except there's a load-balancer in between, and I have no access to this ...
0
votes
0answers
35 views

How do I 301 redirect - for all urls of my website to one single page

I have a website: www.example.pro with pages like: www.example.pro/contact-us/ and www.example.pro/about/ I want every URL from this website to redirect to: www.example.com Example: when opening ...
0
votes
1answer
38 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
30 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
31 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
135 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
33 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
135 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
80 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
99 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
57 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
32 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
35 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
65 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
258 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
146 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
101 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
66 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
64 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
166 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
705 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
841 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
53 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
27 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
41 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
734 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
105 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
126 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
678 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
217 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
2k 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
1k 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
514 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
812 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, ...