MyBB Community Forums

Full Version: Just example/
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Right now there's a page on my forum website (not part of MyBB) that hold the url, site.com/example/index.html my question is, how do I make it so it is only site.com/example ???? In this case that url will go to the index.html but it will not be shown in the url.
If you have a file named index.html (or index.php), whenever you visit site.com/example, it will show the index.html file.
But that's not working for me Sad
First / Priority to read:
1> index.htm
2> index.php
(2011-11-15, 06:16 PM)phwebmaster.net Wrote: [ -> ]First / Priority to read:
1> index.htm
2> index.php

Mine is index.html does that make a difference? Do I change it to .htm? how?
Yap, try to change it to .htm
And see the result.

In htaccess, add this:

"DirectoryIndex index.htm"


Thanks paveman and Garfield Smile
the .htaccess file in the /example folder needs to be there with "DirectryIndex index.html" i fyou want to support .html extension. Most fols use "DirectoryIndex index.php index.html index.htm" in order to support all the types in the order of most relevant
(2011-11-15, 06:16 PM)phwebmaster.net Wrote: [ -> ]First / Priority to read:
1> index.htm
2> index.php

That's not accurate, it depends on your DirectoryIndex settings (if you're using Apache)...

To the Original Poster:
In your .htaccess file, add:
DirectoryIndex index.html index.php index.htm

That will set the priority to index.html, and then index.php, and finally index.htm, if there's no pages like that, it will list the content of your directory,

note that these settings apply to all the subdirectories.
Hope that helps Smile