Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
sub-domain index.html page to domain redirect with htaccess maybe.
Old 12-15-2010, 06:50 PM sub-domain index.html page to domain redirect with htaccess maybe.
duneglow's Avatar
Novice Talker

Posts: 10
Trades: 0
Hi

I have a hosting account with hostmonster which allows me to add a new domain to subdomain folder of the master account.

so in other words I could turn this: http://subdomain.domain.com

into this: http://domain.com

the problem that I'm having, is that after adding the domain to the subdomain directory, visiting the domain page displays a file directory instead of the webpage, in other words the index.html file does not display the webpage automatically, in order for me to display the webpage I have to literally input http://domain.com/index.html

How can i get the index.html to display its content when I just type http;//domain.com and not http://domain.com/index.html

can i do this through .htaccess and if so what is the code that i should use?

thank you

__________________
Pain is weakness leaving the body

Please login or register to view this content. Registration is FREE
duneglow is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-15-2010, 06:54 PM Re: sub-domain index.html page to domain redirect with htaccess maybe.
Gakoyu Ojima's Avatar
Skilled Talker

Posts: 59
Location: Netherlands.
Trades: 0
Should be doable by adding an .htaccess file in the directory which shows a mere list instead of what you want. In the .htaccess file, add the following:

Code:
DirectoryIndex index.html
That should set the default index to <specified name and extension>, regardless of being accessed via the 'shorthand' or not.
__________________
$gocore = new gakoyucore();
$con = mysql_connect($gocore->server, $gocore->username, $gocore->password) or die(mysql_error());
Gakoyu Ojima is offline
Reply With Quote
View Public Profile
 
Old 12-15-2010, 07:06 PM Re: sub-domain index.html page to domain redirect with htaccess maybe.
duneglow's Avatar
Novice Talker

Posts: 10
Trades: 0
Thanks a million Gakoyu Ojima, that did the job, I hope that I can return the favor sometime.
__________________
Pain is weakness leaving the body

Please login or register to view this content. Registration is FREE
duneglow is offline
Reply With Quote
View Public Profile
 
Old 12-29-2010, 02:35 AM Re: sub-domain index.html page to domain redirect with htaccess maybe.
Average Talker

Latest Blog Post:
phpinfo.php file on server
Posts: 18
Name: Ash
Trades: 0
hmmm...
Why did you do that?
Is there any specific reason, you wanted it in that way?
__________________
~Ashwini
AshwiniS is offline
Reply With Quote
View Public Profile Visit AshwiniS's homepage!
 
Reply     « Reply to sub-domain index.html page to domain redirect with htaccess maybe.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13980 seconds with 12 queries