Home
Support Forums

Redirect file not redirecting

First of all, thank you for this awesome service, it works great!

Unfortunately, I am hitting a problem with the proxy redirect configuration file.

We want to redirect the traffic to our new domain using the _redirects configuration file: Rewrites and proxies | Netlify Docs, our application is app-testing-passculture.

This is how it look like:

/static/js/* /static/js/main.cabdf42a.js 301
/:path1/static/js/* /static/js/main.cabdf42a.js 301
/:path1/:path2/static/js/* /static/js/main.cabdf42a.js 301
/:path1/:path2/:path3/static/js/* /static/js/main.cabdf42a.js 301
/:path1/:path2/:path3/:path4/static/js/* /static/js/main.cabdf42a.js 301
/:path1/:path2/:path3/:path4/:path5/static/js/* /static/js/main.cabdf42a.js 301
/:path1/:path2/:path3/:path4/:path5/:path6/static/js/* /static/js/main.cabdf42a.js 301
/static/css/* /static/js/main.cabdf42a.js 301
/:path1/static/css/* /static/js/main.cabdf42a.js 301
/:path1/:path2/static/css/* /static/js/main.cabdf42a.js 301
/:path1/:path2/:path3/static/css/* /static/js/main.cabdf42a.js 301
/:path1/:path2/:path3/:path4/static/css/* /static/js/main.cabdf42a.js 301
/:path1/:path2/:path3/:path4/:path5/static/css/* /static/js/main.cabdf42a.js 301
/:path1/:path2/:path3/:path4/:path5/:path6/static/css/* /static/js/main.cabdf42a.js 301
/accueil/details/:offerId /accueil/details/:offerId 200
/* https://app.testing.passculture.team 302

For some reason, the traffic never get rerouted, I have tested with curl:

$ curl -H 'Cache-Control: no-cache' -L -v https://web.testing.passculture.team?fewfwe=3112
* TCP_NODELAY set
* Expire in 149895 ms for 3 (transfer 0x55b4c194ee00)
* Expire in 200 ms for 4 (transfer 0x55b4c194ee00)
* Connected to web.testing.passculture.team (3.67.234.155) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=web.testing.passculture.team
*  start date: Oct  1 13:00:40 2021 GMT
*  expire date: Dec 30 13:00:39 2021 GMT
*  subjectAltName: host "web.testing.passculture.team" matched cert's "web.testing.passculture.team"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55b4c194ee00)
> GET /?fewfwe=3112 HTTP/2
> Host: web.testing.passculture.team
> User-Agent: curl/7.64.0
> Accept: */*
> Cache-Control: no-cache
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* Connection state changed (MAX_CONCURRENT_STREAMS == 4294967295)!
< HTTP/2 200 
< cache-control: public, max-age=0, must-revalidate
< content-type: text/html; charset=UTF-8
< date: Wed, 24 Nov 2021 13:36:44 GMT
< etag: "ff26ee7ba16dab8aa0e5607ef963705a-ssl"
< strict-transport-security: max-age=31536000; includeSubDomains; preload
< x-xss-protection: 1; mode=block
< age: 2295
< server: Netlify
< x-nf-request-id: 01FN94SD2QB8TMQSJ0GD12X4J2
< content-length: 9044
< x-content-type-options: nosniff
< x-frame-options: DENY
< 
<!doctype html>
# ...

I expected https://web.testing.passculture.team to redirect to https://app.testing.passculture.team.

Why is our wildcard redirection not re-routing the traffic with 302 as expected?

Thanks for reading & helping!

Hi @kopax,

Did you try using 302!?

Yes it does. Thank you.

Did I miss something in the documentation ? Why do I MUST have the question marks ?

see Rewrites and proxies | Netlify Docs