Answers.Body: <p>Okay. I found the solution If anyone runs into the same issue.
  This must be a server problem which I can't solve so there is a <a href="https://stackoverflow.com/questions/5730092/how-to-remove-html-from-url">htaccess solution</a> to remove the .html extension:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)\.html$ /$1 [L,R=301] 
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-01-06T14:07:56.133Z
Answers.LastActivityDate: 2015-01-06T14:07:56.133Z
Answers.LastEditDate: 2017-05-23T12:38:53.957Z
Answers.UserDisplayName: KSPR
Body: <p>I just realized that my page is also accessible when there is a .html extension on the url.</p>
  
  <p>The url would be:
  <a href="http://musikwerkluzern.ch/programm" rel="nofollow noreferrer">http://musikwerkluzern.ch/programm</a></p>
  
  <p>but <a href="http://musikwerkluzern.ch/programm.html" rel="nofollow noreferrer">http://musikwerkluzern.ch/programm.html</a> works as well but some tags are not being rendered with the html extension attached.</p>
  
  <p>And for some reason the google search results link to the page with .html attached.</p>
  
  <p><img src="https://i.sstatic.net/Cwqhy.png" alt="enter image description here"></p>
  
  <p>That's bad. How can I prevent this? Is this a <code>.htaccess</code> thing?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-01-06T07:07:21.567Z
Comments.Text: After further examination I conclude it must be a server thing because other Craft sites I've made on other servers don't have this behaviour.
Comments.UserDisplayName: KSPR
Tags: <url><seo>
Title: url with .html extension
ThreadText: # url with .html extension
  
  (Asked by: username_0 on 2015-01-05)
  
  I just realized that my page is also accessible when there is a .html extension on the url.
  
  The url would be:
  <http://musikwerkluzern.ch/programm>
  
  but <http://musikwerkluzern.ch/programm.html> works as well but some tags are not being rendered with the html extension attached.
  
  And for some reason the google search results link to the page with .html attached.
  
  ![enter image description here](https://i.sstatic.net/Cwqhy.png)
  
  That's bad. How can I prevent this? Is this a `.htaccess` thing?
  
  **Tags:** url, seo
  
  > **Comments:**
  > **username_0**: After further examination I conclude it must be a server thing because other Craft sites I've made on other servers don't have this behaviour.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-01-06. Score: 2 | Accepted answer
  
  Okay. I found the solution If anyone runs into the same issue.
  This must be a server problem which I can't solve so there is a [htaccess solution](https://stackoverflow.com/questions/5730092/how-to-remove-html-from-url) to remove the .html extension:
  
  ```
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)\.html$ /$1 [L,R=301] 
  
  ```
  
  
  ---
  
  