It’s not directly related to Freeway (other than the site is built in Freeway) but, does anyone know what I need to put in my .htaccess file to make it so that if someone types in:
The Apache feature you want to enable is known as MultiViews.
Basically, it takes any request, first tries it as written to see if
it matches (might be a folder), then tries adding suffixes to it and
sees if that matches. This adds a little time to the request (while
Apache plays 20 Questions with the filesystem) but the result is that
you can have very flexible URLs like this.
Doing this in a rewrite will be pretty tricky, because it could put a
missing request (404) into an infinite loop, tacking .php on the end
of it until you run out of patience and restart the server.
Walter
On Aug 5, 2011, at 11:35 AM, Sly wrote:
Hi,
It’s not directly related to Freeway (other than the site is built
in Freeway) but, does anyone know what I need to put in my .htaccess
file to make it so that if someone types in:
Yes. EIther look for this feature in your Apache settings on your
server’s control panel, or ask your hosting provider to enable it for
you. It’s usually one click, and a restart, and away you go.
You may even be able to enable this using your htaccess file (put this
fairly high up, before any rewrites):
Options +MultiViews
As long as that doesn’t result in an immediate 500-series error on
your next try of the site, you should be good. If you do get a 500
error, that means that your host has disabled your ability to change
this setting through htaccess – not necessarily that it cannot be
done at all through some other means.
Walter
On Aug 5, 2011, at 12:29 PM, Sly wrote:
So you are suggesting enabling MultiViews rather than using ReWrite?