2

I have WordPress behind Azure CDN.

The current $_SERVER['HTTP_HOST'] points to the CDN's origin server resulting bypassing of the CDN.

I want to know what the best way of changing $_SERVER['HTTP_HOST'] is so that it defaults to the public URL?

Currently, I modified wp-config.php and added the following

$_SERVER['HTTP_HOST'] = 'FrontEndWebsite.com'; 

It appears to resolve the problem as the website paths are now correct.

I was wondering if this is the best practices way of doing it?

Thanks in advance.

amarinediary
  • 4,930
  • 4
  • 27
  • 45
user1709730
  • 141
  • 2
  • 10

0 Answers0