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)

1
vote
1answer
13 views

Redirection with subdirectories urls in Nginx

When with my browser, I do a call to http://myhost/tiles/yellow/1/2/3.png, I would expect to get content from http://myhost/cache/yellow.png My configuration is the following location /cache/ { ...
1
vote
2answers
25 views

Apache httpd does not implement updates to a 301 redirect configuration

I'm having a problem updating a previously-working redirect in my apache server (httpd, rhel). I'd previously had: RedirectMatch 301 ^/apidocs/ /old/specific/path/apidocs/ which worked. I changed ...
-2
votes
1answer
13 views

How to redirect between Wordpress site using .htaccess if the origin has .html [closed]

How to redirect between Wordpress site using .htaccess if the origin has .html the first site i use permalink .html example: www.domain.com/articles/content.html if i'd like to use 301 redirect to ...
0
votes
0answers
37 views

Nginx redirects http request to one vhost

I have installed nginx with php-fpm. When I try to access example.org it redirects me to https://example.com What's wrong with my configs? nginx.conf user www; worker_processes 1; ...
-1
votes
0answers
24 views

DNS configuration canonical redirect [duplicate]

I am trying to implement www resolve on a customer's site. Unfortunately, Yahoo does not have htaccess or 301 redirect capabilities and so I have been advised to use the dns cname as a workaround but ...
-2
votes
2answers
45 views

Is Apache RedirectMatch a good solution for these urls [closed]

I have a Rails app which is throwing exceptions when I get some strange urls with lots of garbage characters. For example ...
-1
votes
1answer
26 views

Trying to get nginx to return 301, preserving $_GET

I'm having trouble configuring nginx to return the url I want. I'd like http://domain.com/blah?abc=e9800ecf8 to return http://domain.com/createpage.php?abc=e9800ecf8, i.e. it preserves the abc ...
0
votes
1answer
46 views

Nginx redirects not getting used

I have an nginx.conf file that looks something like this: http { server { listen 80; server_name myapp.org; return 301 http://www.myapp.org$request_uri; } server { ...
1
vote
1answer
46 views

Lighttpd redirect non-www to www

I want to redirect all non-www to www on my domain. But when I use this code provided by some websites, and do a graceful restart of the lighttpd server, my website doesn't function anymore - at ...
0
votes
0answers
74 views

Redirect the direct links to static files from non-www to www

My website is using WordPress 4.1.1, multisite, subdomain install. I've changed it from non-www to www successfully after updating the database ( ...
0
votes
1answer
78 views

firefox vs chrome behave different 301 redirect

I have this nginx config: worker_processes 1; error_log /home/paolino/error.log notice; events {worker_connections 1024;} http { include mime.types; default_type ...
-1
votes
1answer
34 views

New domain and HTTPS redirects [duplicate]

I have a domain.co and just bought domain.com and want to use SSL on it. Having in mind this H5BP apache config for HTTP to HTTPS redirect: <IfModule mod_rewrite.c> RewriteEngine On ...
1
vote
1answer
93 views

Why is https://www.foobar.com redirecting to itself?

I don't have any rules that suggest https://www.foobar.com should redirect to https://www.foobar.com. But why is it doing that? This is my curl output: curl -Ik https://www.foobar.com HTTP/1.1 301 ...
4
votes
1answer
150 views

Apache Redirect Permanent Not Working

I have two redirects on my site. One of them is working, and one of them is not. Here are the relevant lines from my configuration, edited to protect the innocent. <VirtualHost *:80> ServerName ...
0
votes
0answers
29 views

Combining a 301 and aliases in Apache VirtualHost blocks

I manage (just about) Apache and VirtualHosts for the server and am trying to determine the most efficient and SEO-friendly method for a client with: an old domain/dirs/ that needs a 301 to a new ...
0
votes
0answers
239 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
461 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 ...
1
vote
1answer
430 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
400 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
201 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
59 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
47 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
113 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
83 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
291 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
33 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
65 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 ...
2
votes
1answer
549 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
31 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
53 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
48 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
59 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
52 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
319 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
52 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
3answers
513 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
227 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
138 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: ...
1
vote
2answers
158 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
40 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
64 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
88 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
375 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
181 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
171 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
117 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
114 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
254 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 ...
2
votes
4answers
2k 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
1k 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 ...