Hi, The other day I saw a website that had pages ending in .page instead of .php/.shtml/.html. Just wondering, is this htaccess that does that? I'm not sure if there's any benefit, but it looks neat. Thanks.
It depends what webserver they are using, if it is Apache then yes it is done in .htaccess where as with IIS it is done directly on the server itself. Where there is benefit is hiding the language/ framework it is using (to a minor degree - a few of the top "php" sites dont actually run php) and more so if you switch frameworks and dont want to have to 301 redirect your complete site to a file extension. I have to say I have been curious as to if using a keyword as a file extension would impact SEO but have never had the time/ inclination to research it. Generally they arent that great in real terms due to peoples memory not being great and so almost always defaulting to .html if they forget the extension of the url they are attempting to type
Ha... false sense of security. Besides, if you are going to use URL rewriting, why not scrap the file extension altogether?
^ True, I hate it when I see file extensions. A user shouldn't have to remember what the file extension is, just the page name itself IMO.
I just started reading about how "AddType" can change the file extension; but it can also change the extension to nothing? Interesting, thanks.
Yes, you can set to handler for files without an extension. Or, you can use mod_rewrite, you can even send every request to one script (a front controller) and let it dispatch the request as needed.