NetTalk Central

Author Topic: Static pages  (Read 5029 times)

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Static pages
« on: August 25, 2018, 04:28:48 PM »
Bruce,

     I'm beginning to experiment with static pages.  I have a NT 10.24 app compiled as a dll and used with the Multi-Site host app.  This works well with the normal default page set as Index.htm.  I get the NT app generated Index.htm file as expected. 

     I also have a static page called Index.htm in the Web folder.  For now, I want to serve the static Index.htm page as the default page when I type the URL, which is Rejuvia4you.com.  This seems to work, but there is a HOME menu item on these static pages that points to Index.htm.  When I click on HOME, I get the NT generated Index.htm file, not the static Index.htm file.

     I then tried a copy of the static Index.htm file called Default.htm.  I changed the default file setting in the Host app as seen in the attached image.  This works, but again when the HOME menu item is clicked, the NT generated Index.htm file is served.

     I also tried leaving the default page set as Index.htm, then setting a redirect at my domain to:  https://rejuvia4you.com/Index.htm (and https://rejuvia4you.com/Default.htm).  This does not seem to work.  I always get the NT generated Index.htm file served as the default.  Perhaps this is expected and I have a gap in my understanding of how this should work.  Can you offer thoughts on this?

Thanks,

Jeff
« Last Edit: August 25, 2018, 05:00:38 PM by jking »

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: Static pages
« Reply #1 on: August 25, 2018, 06:58:07 PM »
Bruce,

     I found an item posted 4/29/2014 that says: "...Indexpage procedure may have the Page Name set as Index.htm.  In which case it will override any static file called Index.htm."  I think this is what I'm seeing so I'll adapt my IndexPage procedure accordingly.  Please let me know if I'm going in the wrong direction.

Thanks,

Jeff

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Static pages
« Reply #2 on: August 26, 2018, 02:05:44 AM »
Hey Jeff,

I'm going off of memory here so I may be rusty on static  pages...

I don't know if you're wanting the generated Index page or not.

You may notice under the default page field, Webserver window, webserver extension, it defaults to "IndexPage."  Notice the missing "htm" or "html" extension.  You can create a static Index page and reference it in the defaut page field but enter the full filename such as "Index.htm'

Remember each static page has to have <-- Net:WebServer --> at the top of the page in the html.

I juust re-read your original post and I think you still have both Index.htm files in your app.  I don't think you can have both and the webserer serve the one you want. 

Anyway, I hope maybe I shed some light on it.  If not, post some more about your issue or I would be happy to schedule a Teamviewer session with you.

You can shoot me an email.

donaldridley2011@gmail.com

Don
« Last Edit: August 26, 2018, 02:12:18 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

jking

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: Static pages
« Reply #3 on: August 26, 2018, 07:29:38 AM »
Don,

     Thanks for the reply.  I changed the Page Name field to Index.html.  The default static page I want to call is Index.htm and it now all works as expected.  See the attached image.
     The reason for all this is I purchased some web page templates, i.e. static pages, to be hosted with a NT server.  Initially we just need a web presence for little or no cost.  In the future I may wish to add dynamic content and will embed <-- Net:WebServer --> where needed.

Thanks,

Jeff
« Last Edit: August 26, 2018, 07:36:40 AM by jking »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Static pages
« Reply #4 on: August 26, 2018, 10:40:20 PM »
yes Jeff, you did the right thing.

cheers
Bruce