cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
Highlighted
New

Plesk Hosting: Remove .HTML from URL

Having issues removing .html from end of URL. Have tried creating a web.config file and uploading it to the root directory with code I have found, but it doesn't seem to be working - any ideas?

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
New
Solution

Re: Plesk Hosting: Remove .HTML from URL

<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>

View solution in original post

Highlighted
Solution

Re: Plesk Hosting: Remove .HTML from URL

Thank you. This works. If you follow the code above and follow the advice given here. It won't fail. You need to open a private window and you will see it there. It takes a second or two to permanately show. Just close your normal window opened and test your pages again, you will see it.

View solution in original post

6 REPLIES 6
Highlighted
New
Solution

Re: Plesk Hosting: Remove .HTML from URL

<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>

View solution in original post

Highlighted
Community Manager
Community Manager

Re: Plesk Hosting: Remove .HTML from URL

Hi @Fraz. Welcome to GoDaddy Community!

 

I'm not a scripting expert, so I don't think I'll be able to shed any light on why that script isn't working for you. However, after doing some searching online, this post on Stack Overflow might be helpful. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.
Highlighted

Re: Plesk Hosting: Remove .HTML from URL

This code works! Just remember to remove ".html" from all your links in your HTML, otherwise you won't see the effects of the web.config.

Highlighted
New

Re: Plesk Hosting: Remove .HTML from URL

didnt work for me at all! 

Highlighted

Re: Plesk Hosting: Remove .HTML from URL

awesome thanks man

Highlighted
Solution

Re: Plesk Hosting: Remove .HTML from URL

Thank you. This works. If you follow the code above and follow the advice given here. It won't fail. You need to open a private window and you will see it there. It takes a second or two to permanately show. Just close your normal window opened and test your pages again, you will see it.

View solution in original post