Export site without the extensions

Hi I have completed some design work with multiple pages. Now when I export the design to file and upload to webserver, I noticed that all links and menus are ending with .html.

I came across a .htaccess setup that hides the extension but issue is all my links when you hover your mouse still showing .html even though the URL no longer shows that.

Is there a way to fix this on BSS?

Htaccess Code

RewriteEngine on

RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]

This is a bit of a hassle, but usually I create a folder structure at the beginning to make the URLs neater, then save a file with the name index.html in each directory

You can see examples of the results, for example, on one of the open source event sites that I manage with BSS

1 Like

The reason you’re still seeing .html on your links is because the links still end in .html - even though the .htaccess is hiding them, you can create an export script to strip them. Or remove them manually.

1 Like