Getting Rid of File Extensions
I've noticed on web pages, such as Google Images, that their URL has no file extensions so instead of the url being 'www.google.com\images.html'
it is 'www.google.com\images' , there is no extension. I would like to no how I can have this sort of URL so I can have 'home' instead of 'home.html' etc.
The complicated way would be to create an own directory for each page and put the page as index.html in there, i. e. for an about page create a sub directory called “about” and the about page would be index.html inside that directory.
The easy way is called “pretty URL” and can be done by modifying the server config, usually with an .htaccess file (if permitted/supported). You know what you have to search for now.
funny thing. my apache2 (nothing special - standard build from ubuntu repo) actually came with this out-of-box.
works for *.html, *.htm and *.php
i figured out what's going on.
it's caused by mod_negotiation.
basicaly if it's enabled it will try to guess mime type of document if you won't provide suffix and if file exists it will be server instead of 404 document.
if this module is installed, you can enable it in .htaccess
Thanks guys, really helpful!:)
|All times are GMT +1. The time now is 09:37 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.