All Questions

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

Weird 301-redirect to http from https only happening with CF as proxy on /wp-admin on www subdomain

I have a wordpress blog on an EC2 instance on AWS using the AMI image aws-marketplace/bitnami-wordpress-6.3.2-6-r09-linux-debian-11-x86_64-hvm-ebs-nami-7d426cb7-9522-4dd7-a56b-55dd8cc1c8d0 In ...
user1015149's user avatar
-2 votes
2 answers
32 views

301 redirect the old domain with a certain link to a new domain with the same link

I have a problem, I want to redirect htaccess The content of domainold.com is still used, only this URL has changed from the Old website, namely http://domainold.com/product/register to my new site, ...
Project Downgrade's user avatar
0 votes
1 answer
56 views

nginx redirects with changed response code

I am trying to redirect any location that gives 404 to the front page and change the response code to 302. According to nginx documentation this should be possible? https://nginx.org/en/docs/http/...
7fc9ecfc6810c58545e1bc3b556003's user avatar
1 vote
1 answer
30 views

Redirect removing sufixes after 3 URL segmentes in Nginx

This is the URL that I need to remove the last segment (?order=asc) https://www.example.com/segment_1/segment_2/page/the_number_goes_here/?order?asc This is the code I'm trying: location ~ ^/([^/]+)/(...
btgen's user avatar
  • 11
1 vote
1 answer
69 views

How to remove amp word from center of url

I removed Amp Module from our site and I need to remove amp word from center of all of urls. Using Nginx Web server for example : mysite.com/shirt/nike?amp=1&product_list_dir=asc&...
peyman peymani's user avatar
0 votes
1 answer
234 views

How can I configure Nginx to redirect all traffic to my website to the HTTPS WWW version and HTTPS version for subs with a consistent URL structure

What I am trying to do is to have some clean redirects and don't make the content from the server available everywhere like is available via https://server-ip https://non-www and https://www-version I ...
Crypto Coupons's user avatar
0 votes
0 answers
89 views

Site with subdomains in redirect loop - Nginx configuration Issues

this is the website (the website also have subdomains) nginx configuration: # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to ...
Crypto Coupons's user avatar
0 votes
1 answer
49 views

Nginx custom 301 rewrite

I am struggling to find how to write this scenario 301 redirect to nginx: https://mydomain/$ to be converted https://mydomain/en_us/$ Actually I need to add "en_us" just after mydomain and ...
G. G.'s user avatar
  • 143
0 votes
1 answer
771 views

How to redirect all pages that contain a specific word using the .htaccess file

I have a bunch of indexed pages that start with the same word and they are all 404 so I want to redirect them all to the homepage of the site. The server is Apache, so I would like to use the ....
Petar Cvetic's user avatar
2 votes
2 answers
3k views

.htaccess - Redirect all URLs with one exception

I want to redirect all URLs from one domain to another. Some of the old URLs have new counterparts with specific pages to redirect to. All other URLs should redirect to the homepage of the new domain. ...
Cray's user avatar
  • 135
1 vote
1 answer
658 views

htaccess: 301 redirect defined URLs to new domain and catch all redirect the rest

I want to redirect some URLs from an old domain to new versions on a new domain. The old domain uses the www. subdomain and SSL. For example: olddomain.com/audi -> newdomain.com/cars/audi ...
Cray's user avatar
  • 135
0 votes
1 answer
1k views

HaProxy redirect to internal URL

I have a configuration with two backend servers I need to redirect 301 to each server with an internal URL on HTTP. It's hard to use SSL because I can't install SSL on the Report Server in that ...
Dr.Fr05t's user avatar
1 vote
1 answer
160 views

How Can We Do 301 Redirect Of Over 200 Pages To Corresponding 200 Pages At New Location?

I need help and need it fast. We recently migrated a subdomain to integrate with the domain. Eg. https://blog.example.com to https://www.example.com/blog https://blog.example.com has a ton of traffic ...
user18571's user avatar
0 votes
1 answer
235 views

nginx: [warn] server name has suspicious symbols with long domain redirect

What is the best way in Nginx to redirect two Long domains URLS, I would like to configure a redirect between two domains like this: I'm sure this has been asked before, but I can't find a solution ...
Santosh Baruah's user avatar
0 votes
0 answers
329 views

Issue with Nginx Url Rewrite /Redirect

For new site config I tried NGINX rewriting for the blog plan and keep the paths the same, just redirect from 'www.' to 'blog.'. and plan for RSpace API and CME have been configured and the ALB. www....
santosh baruah's user avatar
0 votes
2 answers
47 views

route your blog from xyz.com/blog/ to abc.com/blog/

My WordPress website domain name was abc.com (let's say) now due to a new partnership agreement the domain name is changing to WordPress xyz.com (let's say). I tried this answer https://stackoverflow....
paul's user avatar
  • 103
0 votes
3 answers
495 views

Best way to do 301 redirects

Which is the best way to do 301 redirects (for whole domains and also for specific pages/directories)? Using Apache virtual blocks, .htaccess or other solutions? "Best" for me probably means ...
migueltic's user avatar
  • 113
0 votes
1 answer
710 views

Redirect all pages to non www and one page to www

I want to redirect all my internal pages (eg: example.com/about) to their non-www version but I want my homepage (https://example.com) to redirect to its www version (https://www.example.com). I ...
Excellent Exim House's user avatar
0 votes
0 answers
113 views

How to not redirect if is from social media site with Nginx?

How do I not force a redirect if it's from a social media site like reddit,facebook & twitter? Currently my setting is set to redirect any direct access to image files but I don't want to redirect ...
TravelWhere's user avatar
1 vote
0 answers
599 views

Nginx rewrite and return interfere with different location block

I have the following configuration in nginx for redirecting in a certain scenario. location /prefix-someurl { if (condition) { return 301 $scheme://$host/xyz.html; } proxy_pass ...
Syed Osama Maruf's user avatar
0 votes
0 answers
77 views

Extra trailing slash when re-directing www to non-www

This is my current configuration: server { if ($host = www.mywebsite.com) { return 301 https://mywebsite.com$request_uri; } # managed by Certbot if ($host = mywebsite.com) { ...
Dr.Kameleon's user avatar
4 votes
1 answer
3k views

Have nginx redirect everything to https except one directory

I need nginx to redirect all http URLs to https, with the exception a ".secret/" directory which should continue to be served as http. So, for example: http://example.com/a.html --> ...
scaramouche's user avatar
1 vote
1 answer
70 views

nginx - 301 redirect wrong URLs used on extern website

For some reason, some extern websites have links to my website subdomain.example.com looking something like this: <a href="https://subdomain.example.com/https://subdomain.example.com/index.php?...
Perrschy's user avatar
0 votes
0 answers
851 views

NGINX - subdomain using https to another internal IP:PORT and hide new path

I have spent more than week looking around this site to solve the following two items. Background: subdomains are setup in GoDaddy DNS to forward to our public IP. Internally DNS has forward and ...
carlfitzsimmons's user avatar
1 vote
1 answer
7k views

How do you redirect URLs with a query string with htaccess?

I want to redirect pages like : example.com/fr/opportunites/?sector_cat=bourses-detudes&ajax_filter=true To example.com/fr/bourses-detudes/ the second page is a post type page created with ...
LH AL's user avatar
  • 11
0 votes
2 answers
174 views

Need assistance to rewrite url in Nginx for WHMPRESS

I need to rewrite URLs in NGINX. I tried many examples from google searches but failed. /manager/?whmpca=order_process&a=add&pid=5&a=add&currency=1&billingcycle=monthly I need to ...
Faheem's user avatar
  • 11
0 votes
1 answer
146 views

Apache Redirect with OR Operator

How can I use the Apache OR operator to redirect several paths to one URL? E.g.: RewriteEngine on RedirectMatch 301 /foo || /foo/bar || /das.html https://example.com/ext/ddy/$1 Thanks for any help.
GTS Joe's user avatar
  • 199
1 vote
2 answers
4k views

How do I correctly implement DNS and redirects from subdomain to domain

We are updating our website (example.co.uk) part of which involves setting up 301 redirects from the old site, in the .htaccess file — which is fine and straightforward. The old site had an area that ...
Aaron's user avatar
  • 11
1 vote
1 answer
458 views

.htaccess Redirect 301 - Single pages work fine, homepage doesn't

I'm trying to redirect some specific pages to the new ones on my new site (these redirects work fine) and, finally, my homepage OR (even better) my homepage and all the pages which I didn't redirect ...
Daniele Carollo's user avatar
1 vote
1 answer
9k views

htaccess redirect all urls with question mark parameter to without

I checked a lot, for my question. there are some close, but none that would solve my problem. I need to permanently redirect ALL URLs that end in this: ?mode=list AND ?mode=grid to without (remove ...
vyperlook's user avatar
0 votes
2 answers
264 views

NGNIX Redirect with two Parameter

So at the moment this is working for me: if ($request_uri = "/web/news.php?id=69") { rewrite ^ https://www.camper-center.ch/? last; } But now I also have URLs like /web/listing.php?...
Domenico Sanfilippo's user avatar
1 vote
2 answers
636 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 ...
John Moody's user avatar
0 votes
1 answer
509 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 ...
R.M. Reza's user avatar
  • 155
1 vote
1 answer
113 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/...
BigBlack's user avatar
3 votes
3 answers
11k 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 ...
miguelmorin's user avatar
0 votes
1 answer
172 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: ...
Jack Duldi's user avatar
0 votes
1 answer
314 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....
Jack Duldi's user avatar
0 votes
1 answer
2k 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; # ...
Jack Duldi's user avatar
0 votes
0 answers
528 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/ &...
Jack Duldi's user avatar
0 votes
2 answers
109 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/...
Jack Duldi's user avatar
1 vote
1 answer
984 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 ...
adrianTNT's user avatar
  • 1,139
0 votes
0 answers
162 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:...
Jack Duldi's user avatar
0 votes
2 answers
3k 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 ...
user555589's user avatar
0 votes
0 answers
230 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 ...
Jakke Lehtonen's user avatar
0 votes
1 answer
314 views

How to create a rule that forwards people who access sharepoint.domain.com (for example) to our default SharePoint Online page?

We're using SharePoint online and we're trying to avoid using the default domain used by Microsoft. Also the default domain happens to be an old one. I've tried to create an IIS site which would do ...
msc03's user avatar
  • 1
3 votes
1 answer
773 views

Redirect all URLs from http to https (with 301 ) except for a few [duplicate]

I am trying to 301 redirect all URLs from http:// to https://, using .htaccess. Some dynamically generated URLs should be excluded. Example of some URLs I do not want to redirect: example.com/tt....
Rogge's user avatar
  • 33
0 votes
0 answers
250 views

Redirect old domain to new domain with different URL structure NGINX

As the title says I want to redirect a domain to another domain with different URL structure. for example, domain A have URL like this domainA.com/files/ghgjhgjhgytuyjghjhhg Domain B has the same ...
SCnet's user avatar
  • 11
0 votes
0 answers
85 views

Redirect from www to non-www not working in Nginx

I'm having trouble redirecting from www to non-www for one of my domain names. In the past I have used a similar (read identical) configuration and it just worked. Somehow this doesn't work however. ...
A. Esposito's user avatar
1 vote
1 answer
240 views

Nginx automatically adds wildcard to redirects

I am making some redirects with nginx, but for some it automatically matches everything at the end of the URL, which creates redirects to the wrong pages. I have these two redirects. location /en/...
E-g's user avatar
  • 113
-2 votes
2 answers
259 views

How can I redirect all web requests to a specific subdomain on Nginx?

I have a website that I only want to serve requests at: abc.mywebsite.com I want any requests to: www.mywebsite.com mywebsite.com <anything that is not abc>.mywebsite.com to be directed to ...
RubyRedGrapefruit's user avatar