[Pro] remove .html

A stupdif thing I can’t seem to solve/find: how to remove .html on a public link to a subdirectory?

like on this very page…

http://freewaytalk.net/forum/view/5


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

  • Select linked text/image
  • Hit Command+K for editing hyperlink
  • Select ‘External’ from the Edit Hyperlink dialog
  • Insert de link/path to the desired folder
  • Hit ‘OK’ and you’re done

You have to keep in mind that this will have you ended up with a static link, when linking ‘Internal’ to specific pages the links are dynamic, which means that even when you move pages around and relocate them in other folders or subfolders, the link will remain intact. That doesn’t work for static links.

There is, however, a better and more reliable way to make the links appear line ‘foldername/’ in stead of ‘foldername/index.html’. There are 2 actions available that ‘clean’ up your links to index.html files within folders/directories :

Just apply the action to the site folder at your Site Pallet and you’re golden. There are options on both actions you can fiddle with, just make sure the action is only applied ‘on upload’ to remain functionality on local testing when NOT via a webserver.

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve fount that the easiest way to hide the file extension is through a little .htaccess trick:

# BEGIN HIDE .HTML EXTENSION
    Options +FollowSymLinks -MultiViews
    DirectorySlash Off
    RewriteEngine On
    RewriteCond %{SCRIPT_FILENAME}/ -d
    RewriteCond %{SCRIPT_FILENAME}.html !-f
    RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^(.+).html$ /$1 [R=301,L]
    RewriteCond %{SCRIPT_FILENAME}.html -f
    RewriteRule [^/]$ %{REQUEST_URI}.html [QSA,L]
# END HIDE .HTML EXTENSION

You should paste that inside the .htaccess file at the websites root on your server. You will have to unhide hidden files with your FTP client to see it. If it does not exist, create it.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Tx guys for a quick reply, I will try both and get back to you how it went; strange thing that FW does not support this (nowadays) common feature.

/diederik


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Caleb, looking at my server the same way was used to another site I am hosting and I tried it and work immediately.

TX!
/diederik


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options