Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

load file from index.html

amd.64

Coder
I am new to the forums, and although I have done web design in HTML, Java Script and CGI it has been awhile, about 20 years in fact. I have don very little with CSS. Please bear with me as I will likely have several questions. I do have extensive experience with Visual Basic, I have had Java and C# classes but that is where it ended. So I at least have the foundations for scripting and programming

I have a self housed Ubuntu 23 server running Apache.

I am using server side includes so my index file currently has the extension .shtml. However when I attempt to load my site I can't just enter mysite.com into the address bar. Doing so I get a directory listing (like running dir in Windows command prompt or ls in Linux terminal). I have to enter mysite,com/index.shtml instead. What would be the easiest way to remedy this?

I was thinking of creating an index.html file then have it redirect to index.shtml. However I do not know the proper way to do this. Is there a better way?

Anybody have any ideas.

Thank You
 
I am new to the forums, and although I have done web design in HTML, Java Script and CGI it has been awhile, about 20 years in fact. I have don very little with CSS. Please bear with me as I will likely have several questions. I do have extensive experience with Visual Basic, I have had Java and C# classes but that is where it ended. So I at least have the foundations for scripting and programming

I have a self housed Ubuntu 23 server running Apache.

I am using server side includes so my index file currently has the extension .shtml. However when I attempt to load my site I can't just enter mysite.com into the address bar. Doing so I get a directory listing (like running dir in Windows command prompt or ls in Linux terminal). I have to enter mysite,com/index.shtml instead. What would be the easiest way to remedy this?

I was thinking of creating an index.html file then have it redirect to index.shtml. However I do not know the proper way to do this. Is there a better way?

Anybody have any ideas.

Thank You
Hi there.
Unfortunately, that is not the way to do so... in order for you to have a mysite.com, you need to buy a domain name. Once you do, you would have to configure your domain host to point to your server
 
Unfortunately, that is not the way to do so... in order for you to have a mysite.com, you need to buy a domain name. Once you do, you would have to configure your domain host to point to your server

I do have my own domain, I only used "mysite.com" as an example. I use my actual domain for several things, a webserver is just one of the many.
 
I do have my own domain, I only used "mysite.com" as an example. I use my actual domain for several things, a webserver is just one of the many.
So then all you have to do is configure your domain to point to your ip address
This should be helpful

 
I already have changed the A pointer in my DNS settings. That was never the problem nor is domain ownership.

When I or a visitor to my site enter "mysite.com" (just an example) into the address bar I or the visitor get a directory listing much like one would get when running dir in Windows command prompt or ls in Linux terminal (see image below). In order to actually see the content on the site I or the visitor must click on index.shtml or enter "mysite.com/index.shtml" into the address bar.

Capture.GIF
 
Back
Top Bottom