Changing root directory (index.*, etc.)

Status
Not open for further replies.

smc42190

New Member
Messages
7
Reaction score
0
Points
0
I've searched but wasn't able to find what I needed (most replies said "just make your own index.html etc." but I know that, of course).

I have a domain at GoDaddy.com (stephencope.net) and I've set the nameservers and parked the domain and it's all swell. However, I have wordpress set up and it's in a folder named, surprise, wordpress. This means the index.php is not in the wordpress folder and when I go to http://stephencopeblog.x10hosting.com or to http://stephencope.net, it takes me to the directory page (as I have no index.html file) rather than to the http://stephencopeblog.x10hosting.com/wordpress.

As well, I'm hoping this will fix my other question. I want to have it so that clicking a link hosted here (by me, I mean, clicking on my blog titles or on my home page) keeps the http://stephencope.net in the address bar. I don't want "http://stephencopeblog.x10hosting.com" to show up at all. So people can link others to http://stephencope.net/1023490/sdfjkla;jdf/qwer1234ji; or whatever, rather than http://stephencopeblog.x10hosting.com/1023490/sdfjkla;jdf/qwer1234ji;. Does that make sense?

Thanks. Any ideas?
 

sunils

New Member
Messages
2,266
Reaction score
0
Points
0
Hi,

just put a index page with the following code in it.

<script language="javascript">
location =http://stephencope.net;
</script>

Upload the page to your public_html directory.

now when you put http://stephencope.net in your browser it will automatically go to
http://stephencope.net/wordpress instead of the directory listing.
 

smc42190

New Member
Messages
7
Reaction score
0
Points
0
Brilliant.

I need to learn some scripting. I'd no idea a redirect was that simple. Thanks.

Edit:

That worked fantastically. Now I need to figure out the masking sort of issue. Any ideas?

Edit 2:

Also, the website stops working every few minutes and then works again. Seems to be a host thing, but I'm not sure? It's just weird to me. Any ideas there?
 
Last edited:

lemon-tree

x10 Minion
Community Support
Messages
1,420
Reaction score
46
Points
48
You could also set up a permanent redirect in Cpanel. It will work slightly better with Google then.
 

smc42190

New Member
Messages
7
Reaction score
0
Points
0
Hmm, my site continues to bounce on and off. Anybody have this problem before?
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
The free servers go down all the time.

As for the redirects, the Javascript redirect may hurt your standing with search engines (spiders don't always support JS). A slightly better (but still deprecated) alternative is to use a Meta refresh, which uses the Meta element to simulate a Refresh header (a proprietary HTTP header supported by the major browsers).
HTML:
<meta http-equiv="refresh" content="0;http://stephencope.net/wordpress" />

lemon-tree's suggestion is the best to redirect http://stephencopeblog.x10hosting.com to http://stephencopeblog.x10hosting.com/wordpress. You might be able to set the document root for stephencope.net to /public_html/wordpress, depending on how the domain name is mapped to the x10 server. If it's controlled from the x10 servers, addon domains let you set the document root for a domain (look to "Addon Domains" in cPanel).
 

smc42190

New Member
Messages
7
Reaction score
0
Points
0
Okay. I'd had it as a parked domain but switched it to an addon domain.

Domain name: stephencope.net
Root: Home/public_html/wordpress
Username: stephencope
Redirects: not redirected (Remove) (Manage Redirection)

That look about right? Something's going wrong still, but I think that's on the domain name side and I'll work on that now.
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Looks good. stephencope.net resolves to 216.245.203.58, which is cossacks.x10hosting.com. http://stephencope.net/ opens the main page. The server response is slow, but cossacks might just be under a heavy load right now.

Edit: looks like cossacks was in the middle of going down when I visited http://stephencope.net/, which is why the server response was so slow.
 
Last edited:
Status
Not open for further replies.
Top