Help! How do I set my homepage?

Status
Not open for further replies.

draegon

New Member
Messages
11
Reaction score
0
Points
0
I don't know how to specify in cpanel which html file is my homepage. Also, is there a way to make subfolders i.e. name.co.cc/subfolder show a default html file (like a homepage) without showing the name in the url i.e. name.co.cc/subfolder/subfolder.html or whatever. same goes with my homepage. i.e. make name.co.cc show name.co.cc/index.
 
Last edited:

vishal

-::-X10 Guru-::-
Community Support
Messages
5,255
Reaction score
192
Points
63
Name your homepage as index.html .It should be uploaded in public_html folder.
You can also create a sub folder and use a homepage in it.
 

draegon

New Member
Messages
11
Reaction score
0
Points
0
Thanks, I tried that earlier but there was a delay. Can I name the folder in my subfolder the same as the subfolder for the same effect as naming it index or home? Is there any way to add to the list of names that work as homepages or do things manually?
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Thanks, I tried that earlier but there was a delay. Can I name the folder in my subfolder the same as the subfolder for the same effect as naming it index or home? Is there any way to add to the list of names that work as homepages or do things manually?

You can add the different files as home page using .htaccess

For example if you this it will makes the default.html as the home page.
DirectoryIndex defualt.html

like this you can add as may as you want in the same line

ex:
DirectoryIndex filename.html index.cgi index.pl default.htm

In the second command it checks for filename.html if it finds it loads otherwise it goes for the index.cgi ....
The .htaccess file is hidden and it will be in public_html folder.
 
Last edited:

draegon

New Member
Messages
11
Reaction score
0
Points
0
so if i add to the .htaccess file (bear with me) a line that says DirectoryIndex asdf.html then whenever i go to my website they will see whatever file comes after the DirectoryIndex (i.e. asdf.html) in the .htaccess file? And what about subfolders? Do I have to create a new .htacccess file for them, or can I add a line to the one in the public_html folder?
 
Last edited:

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
so if i edit the .htaccess file (bear with me) and I edit what comes after the DirectoryIndex then whenever i go to my website they will see whatever file comes after the DirectoryIndex in the .htaccess file? And what about subfolders? Do I have to create a new .htacccess file for them, or can I add a line to the one in the public_html folder?

This is general .htaccess

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

DirectoryIndex index.php

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>

The directoryIndex defines the default home pages.
 
Status
Not open for further replies.
Top