Home Why doesn't IdHTTPServer render this site properly?
Reply: 0

Why doesn't IdHTTPServer render this site properly?

Quantum
1#
Quantum Published in 2018-01-07 19:57:26Z

I'm trying to host this site on my computer with my own custom web server I'm trying to create with IdHTTPServer but for some reason it doesn't want to render anything from that site. It does render simple html files. What I've done is is test it on multiple browsers and there's no luck.

When I host it with apache it renders just fine. Why is this?

Here's the site I'm trying to host locally: https://github.com/Facepunch/webrcon/tree/gh-pages

I'm still new to indy so this is all the code I have:

procedure Tfrmmain.idhtpsrvr1CommandGet(AContext: TIdContext;
  ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
begin
  with TStringList.Create do
    begin
      LoadFromFile('htdocs\index.html');
      AResponseInfo.ContentText := Text;
      Free;
    end;
end;
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.308555 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO