title: JMeter HTTP Sampler - Request GET only successful on homepage, any other page returns 404
body: <h2>Description</h2>
  
  <p>When using the HTTP request sampler in JMeter for a specific website I can't seem to fetch any page other than the home page, <code>http://&lt;website&gt;.com/</code>. If I try to access some other page, say, <code>http://&lt;website&gt;.com/about-us</code> I get a <code>404</code> response.</p>
  
  <p>In the request sampler there are two fields <code>Server Name or IP</code> and <code>Path</code>, and I know it's a common error to fill these out incorrectly. I've tried multiple different ways to enter these correctly. IP with and without the <code>about-us</code> part, with and without <code>/</code> etc.</p>
  
  <p>I've tried this with other websites and have seen no problems, so my assumption is that there is something specific to the website I'm testing.</p>
  
  <p>Here is where I get confused about it. When you look in the <code>View Result Tree</code> you see under <code>Request &gt; Request Body</code> a correctly entered get request. If I enter this into my browser, or do a manual get request on this url on <a href="https://reqbin.com/" rel="nofollow noreferrer">https://reqbin.com/</a> it fetches the website just fine.</p>
  
  <p>The only discrepancy I see between this website and other websites that I don't have this problem with is that the website's about page etc., don't end with a <code>/</code>. If you add the backslash at the end of the URL you can't access the website.</p>
  
  <h2>Steps to reproduce</h2>
  
  <ul>
  <li>Add HTTP sampler in JMeter</li>
  <li>enter server name under <code>Server Name or IP</code>, i.e. <code>www.&lt;website&gt;.com</code></li>
  <li>enter path to <code>Path</code>, i.e. <code>/about-us</code></li>
  <li>run test and watch result in <code>View Result Tree</code></li>
  </ul>
  
  <h2>Expected Result</h2>
  
  <p>HTTP Response 200</p>
  
  <h2>Actual Result</h2>
  
  <p>HTTP Response 404</p>
  
  <h3>Response Body</h3>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;Error&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;pre&gt;Cannot GET /about-us&lt;/pre&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h3>Response Headers</h3>
  
  <pre><code>HTTP/1.1 404 Not Found
  X-Powered-By: Express
  Content-Security-Policy: default-src 'self'
  X-Content-Type-Options: nosniff
  Content-Type: text/html; charset=utf-8
  Content-Length: 147
  Vary: Accept-Encoding
  Date: Tue, 28 Jan 2020 17:11:37 GMT
  Connection: keep-alive
  </code></pre>
  
  <h2>Key notes</h2>
  
  <ul>
  <li>The request body <code>GET http://&lt;website&gt;.com/about-us</code> is a valid link if posted in a browser or if used with <a href="https://reqbin.com/" rel="nofollow noreferrer">https://reqbin.com/</a></li>
  <li>the about page doesn't end with a <code>/</code>, I don't know if this is relevant</li>
  </ul>