0

I have an haproxy that I want to reroute only one url from test.ai to www.test.ai

redirect prefix https://www.test.ai code 301 if { hdr(host) -i test.ai}

But for some reason I get the test.ai redirected you too many times.

1 Answer 1

1

You appear to have a redirect set somewhere else. If you're using Wordpress as a backend. You need to set your site URL and home.

define( 'WP_HOME' , 'https://test.ai'); define( 'WP_SITEURL', WP_HOME . '/'); 

Then you'll need to add:

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on'; 

Finally be sure this is at the bottom...

require_once(ABSPATH . 'wp-settings.php'); 

Otherwise, you may have a redirect or rewrite in your apache/nginx setup

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.