AWS Cloudfront redirecting to S3 bucket : <p>I have created a cloudfront distribution to serve the static website. S3 is origin server.
Now if we access cloudfront url, it redirects to S3 location.</p>

<p>d2s18t7gwlicql.cloudfront.net
or
test.telekha.in</p>

<p>In the browser it is showing 
<a href="https://telekha-test-www.s3.ap-south-1.amazonaws.com/index.html#/dashboard" rel="noreferrer">https://telekha-test-www.s3.ap-south-1.amazonaws.com/index.html#/dashboard</a></p>

<p>i am expecting <a href="https://test.telekha.in/#/dashboard" rel="noreferrer">https://test.telekha.in/#/dashboard</a></p>

<p>If I access <a href="https://test.telekha.in" rel="noreferrer">https://test.telekha.in</a> through curl it returns my index.html document</p>

<p>If I access <a href="http://test.telekha.in" rel="noreferrer">http://test.telekha.in</a> through curl it returns</p>

<pre><code>&lt;html&gt;
&lt;head&gt;&lt;title&gt;301 Moved Permanently&lt;/title&gt;&lt;/head&gt;
&lt;body bgcolor="white"&gt;
&lt;center&gt;&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;&lt;/center&gt;
&lt;hr&gt;&lt;center&gt;CloudFront&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>But in browser both http and https are redirecting to <a href="https://telekha-test-www.s3.ap-south-1.amazonaws.com/index.html#/" rel="noreferrer">https://telekha-test-www.s3.ap-south-1.amazonaws.com/index.html#/</a></p>

<p>Please let me know how to resolve this issue.</p>
