Questions tagged [301-redirect]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
26 views

Redirecting all versions of URL to main site with 301 status code

I want to permanently redirect all requests starting with the following to https://www.example.com using 301 code. http://example.com http://www.example.com https://example.com How should I edit my ...
0
votes
2answers
196 views

Need support to write a Nginx rule

I have deployed my front end application in 7000 ports. So I need to write a rule in Nginx so that whenever all the HTTP request from 7000 ( HTTP://example.com:7000) port will automatically redirect ...
0
votes
1answer
27 views

Why my nginx redirection doesnt work

I`m trying to do redirection via Nginx webmail.mywebsite.to to gmail.com I`m trying with server { listen 80; server_name webmail.mywebsite.com; return 301 https://www.gmail.com; } But ...
0
votes
1answer
37 views

How can I mnually code a 301 redirection via nginx by adding HTTP fields without return and rewrite? [duplicate]

I noticed that when I create a 301 redirection using nginx (rewrite, return 301), I get the following HTML body: <html> <head><title>301 Moved Permanently</title></head> &...
1
vote
2answers
86 views

Google Cloud Platform Loadbalancer - ERR_TOO_MANY_REDIRECTS

I am using Google Cloud Platform to host a Wordpress site in a VM. I am trying to setup a loadbalancer with CDN. Without the loadbalancer site works fine, there is no http to https redirection setup ...
0
votes
1answer
43 views

Apache redirect domain.com to www.domain.com

I want to redirect domain.com to www.domain.com in apache. But when I try following config It gets double redirect www.www.domain.com <VirtualHost *:80> DocumentRoot /var/www/master/...
0
votes
1answer
64 views

301 Redirect with nginx

I moved my website URLs from this form: https://example.com/category/sub-category/post-url https://example.com/category/post-url to this form: https://example.com/post-url And I would like to set up ...
0
votes
0answers
44 views

Apache: Redirect results in too many redirect, but not with Rewrite

Firstly: is not a duplicate of Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About Mod_Rewrite Rules but Were Afraid to Ask. I'd want to know why in my ...
0
votes
1answer
27 views

Nginx Redirect Wordpress Post URL from “Post Name” to “Category Post Name”

How to make a 301 redirect using Nginx from the Wordpress URL "post name": example.com/best-movies-2020/ to "category post name": example.com/movies/best-movies-2020/ I'm a nginx ...
0
votes
0answers
21 views

Multiple website are using my content using my IP in their A records [duplicate]

How can I make all that domains that use my server IP in their A records to redirect to my main website instead of displaying my content?
0
votes
1answer
110 views

Is there an alternative for the error_page 497 option from nginx for haproxy?

When using nginx I can just use the 497 error code specific to nginx 497 HTTP Request Sent to HTTPS Port and redirect to https with this rule: error_page 497 https://$host:$server_port$request_uri; ...
1
vote
1answer
44 views

How to redirect sub.domain.com to www.domain.com/dir/page.html?

I have a old dataserver(data.example.com) which was replaced by a NAS and NAS shares are now mounted on a webserver (www.example.com). So now the oldserver is removed and i have made a "CNAME&...
-1
votes
1answer
100 views

Domain redirect in .htaccess causing SSL “Your connection is not private,” but works OK on non-https://

I've been banging my head trying to resolve this. Here is the problem and what I've done so far: (1) I have domain: domain-one.com (2) domain-one.com forwards to domain-two.com by .htaccess code below ...
0
votes
0answers
30 views

How to protect my domain against temporary redirect attack

Something very terrible happened to one of the sites I work on yesterday. I was called that the site was redirecting to https://www.loyaltycommunication.com. The domain was managed on AWS Route53 ...
1
vote
1answer
33 views

Redirect all unfound links for a third level domain to site index for each language

I need to redirect all unfound pages for each language. I've created a redirect for third domain level en.mysite.it to www.mysite.it/en/ Now I need to understand how to redirect each en.mysite.it/...
0
votes
0answers
34 views

redirecting from an alias url to main url with nginx

I have a site running on Laravel Forge that has a primary domain of example.org and then an alias of myolddomain.com This means that content is available at both. I'd like to make it that if someone ...
0
votes
3answers
367 views

SSL certificate error in domain redirection

I am managing two domain names and want to redirect one to the other. I set up a domain forwarding with 301 permanent redirection from domain S (source) to domain T (target). The server on domain T ...
0
votes
2answers
41 views

ServerName and ServerAlias and do we need to flushdns after apply in vhost?

I have applied ServerName and ServerAlias in my vhost and from here it is mentioned that Servername is hostname and port that server used to identify itself while ServerAlias is the alternate names ...
0
votes
1answer
67 views

Where does RewriteCond %{HTTP_HOST} refer to?

I keep seeing website redirection have something like below: RewriteCond %{HTTP_HOST} But where does the HTTP_HOST refer to? Is it referring to the configuration in some files or the CNAME or ...
0
votes
0answers
15 views

How to redirect root to a subdirectory in apache? [duplicate]

How can I redirect the root of my virtualhost to a subdirectory? I tried this, but it ended up with an infinite redirect: Redirect permanent / /hu/about.html What am I doing wrong?
1
vote
1answer
88 views

Nginx: After removing .html suffixes, how to redirect all requests to the new URLs?

I want to optimize the link structure of an older Magento shop system. Until now, when generating the static pages, a .html suffix was added to the corresponding path. Due to an earlier problem, paths ...
0
votes
0answers
120 views

Is it bad practice to 301 redirect using Google Domains instead of GitHub Pages?

I have a site hosted on GitHub Pages: https://example.dev. I want to ensure https://www.example.dev is redirected to the site. The quick and easy solution is to go into Google Domains as shown here, ...
0
votes
0answers
31 views

RewriteCond pattern all match and logs showing the correct redirect link but website still not redirect [duplicate]

I have done N times of redirection and not successful for N times and now this is the most close to what I want but my website still wasn't redirect. I want my website to redirect from http+example....
0
votes
1answer
151 views

Relationship of ServerName, ServerAlias, host.file and how to define them in httpd-vhosts.conf

I wonder what is the relationship of ServerName & ServerAlias with host.file. As I know ServerName sets the hostname and port that the server uses to identify itself and ServerAlias is the ...
2
votes
3answers
168 views

Website redirection intermittently work in Firefox but not work at all in IE [duplicate]

After few try an error in website redirection, I manage to perform website redirection but it intermittently works in Firefox but not work at all in IE. I manage to clear all cache and retry in ...
0
votes
1answer
39 views

How to get mod_rewrite specific log messages in Windows Server and which file do I need to get?

I have an issue on getting mod_rewrite specific log. I found this on a website and with help from a friend I managed to get this to run in Windows Server Powershell. Below is the command line: Get-...
0
votes
1answer
81 views

How to run command tail -f error_log|fgrep '[rewrite:' in Windows Server

I'm currently performing website redirection from non-www to www+https, but unfortunately, my redirection does not work and I've tried to create rewrite log but it ends up my website down. After ...
0
votes
0answers
169 views

www+https redirection does not work even though redirection has been added in .htaccess file [duplicate]

I'm currently doing www+https redirection where I hope that my website able to redirect from http://example.com to https://www.example.com but it does not work even I have added redirection in ....
0
votes
0answers
106 views

Simplest / cheapest method to redirect non-www to www with HTTPS for many domains in azure?

We have many www-domains pointing to an azure front-door service. Unfortunately we need a redirect, supporting HTTP und HTTPS, for naked domains to www. Binding naked domains to the front-door is ...
0
votes
0answers
18 views

Configure context path as condition for redirect rule in apache 2.4.41

Iam using apache 2.4.41, in RHEL 7 I have configured the a context path as the condition for a redirect rile in apache Eg Redirect permanent /abc/ https://dev-dummy.com/cde This works fine ,but ...
0
votes
1answer
24 views

How to redirect ip servername to main site

Many sites have server name ip in their a records. Showing duplicate content using 302 redirect on many domain names How to make all redirect to only website server is actually using. Config: ...
0
votes
1answer
82 views

I have a lot of traffic and only 1 server best config for nginx/varnish/apache configuration

I have a lot of traffic and only 1 server can I get some help with configuration Nginx.conf config: # For more information on configuration, see: # * Official English Documentation: http://nginx....
0
votes
1answer
93 views

How to use nginx as reverse proxy send all requests to varnish

I have a centos 8 and varnish is on port 80 connecting with apache on port 8080 bellow is my nginx config. user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; ...
0
votes
0answers
80 views

Home page in infinite loop nginx misconfiguration (cache, nginx + varnish)

HomePage Redirect problem Result https://www.example.com 301 Moved Permanently https://www.example.com/ 301 Moved Permanently https://www.example.com/ 301 Moved Permanently https://www.example.com/ &...
0
votes
2answers
39 views

Nginx not redirecting non www version correctly

the http version is handle by nginx and the https is handle by apache. Now my issue is that for example when u type https://sitename.com/contact/ it works fine but when u type http://sitename.com/...
0
votes
1answer
52 views

Apache HTTP to HTTPS Redirect working for alias but not server name

I have created an SSL certificate using Let's Encrypt. The certificate has been installed and is referenced in the Apache config file. The Apache config provides a ServerName (e.g., example.com) and a ...
0
votes
0answers
63 views

nginx permanent redirect with url parameters to a proxy_pass resulting in duplicated url parameters

I have a url for a product which has been replaced and requires a permanent redirect, to another product page for the replacement. The replacement product page is served by a proxy_pass. In my context ...
0
votes
1answer
122 views

set correct request host to avoid this infinite loop in nginx

I configured this nginx server for example.com and www.example.com to be a cache/reverse proxy, taking data from mysource.example.com It seems to work ok in browser, but I noticed significant google ...
0
votes
0answers
42 views

http not redirecting to https://www in nginx | using apache and nginx

Non www version redirects to nginx default page instead of website how can I fix this? https://www.example.com works fine, http://www.example.com works fine, https://example.com works fine, But http:...
-1
votes
1answer
40 views

CNAME for redirected Subdomain

I have a domain domain.com where an A record for my-sub is set and a 301 redirect for my-sub.domain.com to my-sub.notmydomain.com. Now I got an information to set a new CNAME for my-sub.domain.com ...
1
vote
1answer
64 views

Removing trailing slash from redirected URLs (.jpg/ .htm/ .gif/) with Apache

I have a website that is being redirected from an old host. I don't have the ability to change the redirect of the old host. The issue is that the redirect is appending a trailing slash when it's not ...
2
votes
1answer
122 views

Htaccess redirect folder and remove end of URL

I am trying to redirect some URLs using .htaccess but without any success. The problem is that I have to redirect two different parts of the URL. Here is an example of what I have to redirect: ...
0
votes
0answers
46 views

.htaccess 301 redirect resolving to https// (not http://)

https://www.rawgymsdublin.com resolves to http://https//www.rawgyms.com/ syntax in the .htaccess file is: Redirect 301 / https://www.rawgyms.com/ I just updated the name servers to this host on ...
0
votes
0answers
35 views

Cloudfront https 301 redirect not working

I followed this guide and setup an S3 bucket, static site for 301 redirect purpose only. Then setup an ACM Certificate, called it, and the bucket, in cloudfront. The http was redirecting fine, but the ...
0
votes
2answers
434 views

How to redirect domain with expired SSL certificate to new domain using apache

So in the past I used https://example.com. Then decided that I wanted to use https://myotherexample.com instead of example.com. So I setup the server, pointed DNS at that server and everything was ...
0
votes
1answer
47 views

Nginx Redirecting URL (301) with Query String to Final Destination in Single Chain

I need help with nginx redirection I want to redirect: example.com/new-clock/?bc=search&search_id=202 to www.example.com I have used this code in nginx config rewrite ^/new-clock/?bc=search&...
0
votes
0answers
72 views

Nginx - Varnish - Apache2: 301 redirects using map?

Nginx is listening ports 443 and 80, and redirecting everything from 80 to 443. Requests will go to Varnish port 8080 and after that to Apache2 using port 81. That works perfectly. Now all 301s are ...
0
votes
0answers
69 views

HAproxy redirect map

I have a large amount of redirections to make for multiple hosts. The redirections look like this : dom.aaa/page_src_a -----> dom.bbb/page_dist_1 www.dom.aaa/page_src_a -----> dom.bbb/...
1
vote
1answer
240 views

Remove leading slash in URLs - Apache

I've been trying to remove the trailing slashes from all URLs. For example, I want the following URLs to redirect: http://my-site-url.com///test -> http://my-site-url.com/test http://my-site-url.com//...
0
votes
0answers
42 views

Nginx rate limiter doesn't work for the 301 response - is there any security/attack risk?

I've learned that if I have a http/https permanent redirect rule (return 301 on http and point to https), the rate limiter does not apply when querying the http server. The reason is that the rewrite ...

1
2 3 4 5
10