PDA

View Full Version : How to display files without the extension - Help



me_myself
11-07-2008, 09:59 PM
I was looking at this website recently (http://www.cssninjas.com/) - they show their pages without the extension (.html) - i was wondering how they do it. Would be great if you can let me know how to do that.

Thanks.

bluewalrus
11-07-2008, 10:08 PM
make the directories with the name you'd want the page to be called then put an index.html into it

olveyphotodesign
11-07-2008, 11:37 PM
This is done by editing your http_config file on your Apache_server. Here's a link to the Apache Wiki http://httpd.apache.org/docs/2.2/content-negotiation.html. I hope it points you in the right direction.

Ben

tracy16
11-19-2008, 02:07 AM
make the directories with the name you'd want the page to be called then put an index.html into it


you mean make a folder say "tourist info" and put the index page. but will make so many folders if the site is big be appropriate. and the apache thing i did not get. can i get a bit more explanation for it.

thanks
tracy16
keyword research (http://www.keywordspy.com)

Medyman
11-19-2008, 02:27 AM
CSS Ninjas is probably using some sort of content management system. Using PHP, it's easy to get the effect you want. But the site has to built with that consideration from the start.

For example, take the page http://www.cssninjas.com/features
The actual URI of this could be http://www.cssninjas.com/index.php?page=features. But using .htaccess, you can rewrite it so it becomes http://www.cssninjas.com/features.

Have a look at this article (http://www.sitepoint.com/article/guide-url-rewriting/)for more information on mod_rewrite (the process described above).

Note: You don't need to be using URL variables to use mod_rewrite. I just use that as an example as it's a very common use case.