# [SOLVED] uploaded site shows index, not site



## silvergoat (Feb 20, 2010)

I created a web-site using Microsoft WebMatrix, on my computer. It is in cshtml which I had never heard of before (in case that is relevant). Tried to get it to host from my computer, but finally realized that hosting a site needs special software and gave up. I did have a hosted website, so I deleted all the files in the directory, deleted all entries in my database (although I didn't create a database for my site) and uploaded the site to my host.

Problem is that my site gives me nothing but the directory. I don't have an index.html file, but it still works on my computer when it is viewed as /localhost/

I tried renaming the file to Index.html, but no dice. I'm guessing compatibility issues- but I'm not sure where to start looking....usually the more things you mess without knowing, the more complicated you can make the issue, so I'm trying to take this step by step.

Where should I start?


----------



## Laxer (Dec 28, 2010)

*Re: uploaded site shows index, not site*

do you have the software set up for a web server? right now it may only be a "file" server.

If you do have the software installed check for the correct folder structure.

For example the index might have to go in /public_html/


----------



## silvergoat (Feb 20, 2010)

*Re: uploaded site shows index, not site*

I quit trying to serve it off my own PC and uploaded it to a host. I don't know what server software they run for sure, but the bottom of the page displays Apache 2.2.9 Unix

It's probably the host-


----------



## Laxer (Dec 28, 2010)

*Re: uploaded site shows index, not site*

Apache would be the software the server is running.

Do you have access to any online tools such as WHM or Cpanel?

Do you have access to upload to the root of the server?

if so point your browser towards: ftp://Yourdomain.com

and log in.

take a screen shot of the file structure you see.


----------



## silvergoat (Feb 20, 2010)

*Re: uploaded site shows index, not site*

Are you referring to the account login GUI? The host uses hsphere, which if I understand the information you're looking for, would be the interface I use to adjust settings for the serving.

I will upload a screenshot of the screen which I don't understand, but has some of the settings I think are involved.

If I point the browser to my page, I don't get a login- in the past when I've used Joomla and Wordpress, the login is contained within their setup files, which my browser will only open as text at this point because it is not running the code (just my way of wording because I honestly can't say I know what is going on).

I did read something, while searching, that cshtml code is compiled or executes differently than other older scripts do. I did try using Mozilla, Safari, IE, in case it was the browser- but all resulted in the same screen.

When I want to login into my control panel for the site/server settings I go straight to the hosts business site and login through there, but when I want to login into my site to change things that the site actually looks like and text, I only visit the mysite.com/admin once that site has been set up through the software. This site I made is not through a wordpress or joomla type software so it may not offer the same ease of configuration for easy install.

I just took the screenshots, but there is a lot of information that I don't think would be wise to post.

Here is the directory for my FTP, where the site is located. It is a shared service without a dedicated IP and there are 2 sites within my subdirectory.

/hsphere/local/home/myusername/mysite.com


----------



## Laxer (Dec 28, 2010)

*Re: uploaded site shows index, not site*

Not sure why you are using .cshtml

but create a file called "index.html"

and paste this into it:


```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Redirect</title>
<meta http-equiv="REFRESH" content="0;url=http://man-poll.com/index.cshtml"></HEAD>
<BODY>
</BODY>
</HTML>
```
save it and upload it to the root of your server.


----------



## Laxer (Dec 28, 2010)

*Re: uploaded site shows index, not site*

I checked your domain.

I would contact your host and see if they support C#.

this may be the problem as none of your scripts are getting ran.


----------



## silvergoat (Feb 20, 2010)

*Re: uploaded site shows index, not site*

Done, I'll wait for a response.

As to the other questions you posed- cshtml was the format the software provided the template in, so I just ran with it.

I'll have to do some reading on what the differences are because there are more variables than I knew about. Hopefully there will be some way to move it into a different usable format since I don't really want to switch hosts.

Thanks Laxer


----------



## Laxer (Dec 28, 2010)

I would switch to a better CMS.

See if your host suggest one. If they don't Content Management System Software Review 2011 | Best CMS | Content Management, CMS Software - TopTenREVIEWS

the top 3 are excellent.


----------



## silvergoat (Feb 20, 2010)

This host recommended Joomla initially- It was a little too complicated for me at the time so I changed to wordpress. However easy WordPress was, there were some limitations I didn't like so I tried to create the cshtml site which looked great and was very easy to customize since I didn't need the complex features for an information site.

I am reinstalling Joomla right now in hopes that what I learned from WordPress and WebMatrix can be applied to Joomla which should make it a better experience for me this go around.

A final question, if I may; I am at the point where the Database is being set up by Joomla- The very first question is if the Database is mySQL or mySQLi

It defaults to mySQLi and tells me that it is probably that, however, I want this set up to be as accurate as possible. Nowhere in my phpAdmin do I see anything that would imply I have mySQLi- but from what I've read, mySQLi is only an expansion of features that would apply to a mySQL database, so I'm not sure it would be specifically labeled as such.

I went with mySQL since I saw no indication of mySQLi--- it works so far so I hope there are no issues-


----------



## Laxer (Dec 28, 2010)

Using just MySQL should work just fine.

If you run into any questions feel free to ask.


----------

