Streaming live at 10am (PST)

Removing the .HTML when exporting


#1

Hi!

I've got no experience at all when it comes to building websites (thats why i chose webflow) so this might seem like a stupid question.

I've been trying to get rid of the .html behind my website link (www.example.com/index.html).
After trying everything out others said on this forum i still have the .html behind it.

So if anyone could be so kind to help me with this!
Also is it possible it could be because the external server i use is different then others?

Here is the link to my website and how i've uploaded it in filezilla.

Imgur
www.montforum.nl

Thanks in advance!

Chris


#2

Here is my .htaccess for a self hosted site to remove .html from the URLs:

#Apache Rewrite Rules
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /    
#domain-name.com/page will display the contents of domain-name.com/page.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ $1.html [L,QSA]

#301 from domain-name.com/page.html to domain-name.com/page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/
RewriteRule ^(.*)\.html$ /$1 [R=301,L]

#301 from folders (this allows for changing folders to paths
#EXAMPLE
#RedirectMatch 301 ^/projects/index.html /our-work.html

# End of Apache Rewrite Rules
</IfModule>

Hope it helps some people :slightly_smiling:


#3

Thanks for your reply!

Sadly it didnt do anything for me.
Is there anything in that code i have to change? For instance #domain-name.com to #montforum.nl ?
And if that doesn't work either should I just buy another hosting service, or is there anything else i could try?

Thanks,


#4

You shouldn't have to... it should work


#5

Hi @chris_zijlstra, do you happen to know for sure that the external server you are running is a linux/apache server or a Windows server?

If the external server is running windows, you might need some different code. The people who provide the hosting for your external server should be able to tell you.

If the server is running Apache, then it could be the .htaccess file may have been uploaded with an extension, like .txt. If that is the case, just renaming the file on your host to not use an extension, may work.


#6

The server is running windows for sure. that must be it. i'll contact my provider to change it to Linux and will let you guys know.
Thanks alot!


#7

This topic was automatically closed after 60 days. New replies are no longer allowed.