I am using a web.config
file to remove the .html
from the url on my godaddy site I set up for a non-profit . I am rather new to this and was given this code from a friend to help and got nothing but errors and crashed pages.
I uploaded the file to the public/html
folder, renamed the files for each page to just the name (index, services, etc..) and nothing would load.
I previously tried an .htaccess
file but was told it would not work with Godaddy sites for some reason, I still have the file for that also if anyone knows if that way would be better.
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteHTML">
<match url=”(.*)” />
<conditions logicalGrouping=”MatchAll”>
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
</conditions>
<action type=”Rewrite” url=”{R:1}.html” />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
This was saved as web.config
and placed within the public/html
folder and my pages were renamed without the .html
but it did not work.