Author Topic: How to stop index.html from executing  (Read 761 times)

0 Members and 1 Guest are viewing this topic.

Offline rlee171

  • Senior Member
  • **
  • Posts: 97
    • Peaceful Hills Weather
How to stop index.html from executing
« on: May 27, 2019, 08:45:06 PM »
I had to upgrade hosting service with GoDaddy to get php 7.2. It's not available with their "economy" hosting I have been using for 5 years. Now my site displays the standard Cumulus web page when I bring it up do to it using index.html. I have to go to the server and delete the index.html so that the index.php will bring up my Saratoga templates. As soon as Cumulus does an update it recreates a new html file. Gave GoDaddy a call and they had no explanation. It was never an issue before, I'm curious why now. The new hosting service is cPanel if that makes a difference. I have searched the forum and Google for hours. I am unable to find a solution to what is such a simple and obvious problem. Anyone else ever run into this?

Thanks,
Ralph  hsnpar.com
« Last Edit: May 27, 2019, 08:48:06 PM by rlee171 »
Davis VP2 
Blitzortung Stations: 1387  1445  2315
CWOP: EW1823
WU: KARHOTSP16
Cumulus
GRLevel3

hsnpar.com

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 4877
    • KomokaWeather
Re: How to stop index.html from executing
« Reply #1 on: May 27, 2019, 09:27:35 PM »
If you are not using the Cumulus standard template files then you can turn off the Standard files upload in the Cumulus Internet settings.  Then remove any remaining index.htm or index.html and your index.php should then bring up the Saratoga template page.




Enjoy,


Paul

Offline rlee171

  • Senior Member
  • **
  • Posts: 97
    • Peaceful Hills Weather
Re: How to stop index.html from executing
« Reply #2 on: May 27, 2019, 11:02:56 PM »
Paul - you were a step ahead of me...  I assumed everything that Cumulus was uploading was needed. So after spending a stupid amount of time on this today, 30 minutes ago I found out that you can edit the .htaccess file (never new what it was for, lol) to do a whole host of things. Read about it on StackOverflow….  anyway, added the top line below and it works! Sure don't like the looks of all the references to "bing|google|yahoo|msn|aol"..   maybe it's all harmless, but being on the bottom of the food chain here I just don't like seeing it when I don't know what it means. 

DirectoryIndex index.html index.php /index.php
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (bing|google|yahoo|msn|aol) [NC,OR]
RewriteCond %{HTTP_REFERER} (yahoo|bing|google|msn|aol)
RewriteRule ^(.*)$ default.php [L,QSA]
RewriteCond %{HTTP_USER_AGENT} (bing|google|yahoo|msn|aol) [NC,OR]
RewriteCond %{HTTP_REFERER} (yahoo|bing|google|msn|aol)
RewriteRule ^(.*)$ inc.php [L,QSA]
RewriteCond %{HTTP_USER_AGENT} (bing|google|yahoo|msn|aol) [NC,OR]
RewriteCond %{HTTP_REFERER} (yahoo|bing|google|msn|aol)
RewriteRule ^(.*)$ inc.php [L,QSA]

RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
RewriteCond %{HTTP_REFERER} (yahoo|msn|aol|bing|google)
RewriteCond %{REQUEST_URI} !^.*\.(jpg|css|js|gif|png|css|js|xml)$ [NC]
RewriteRule ^(.*)$ inc.php?$1 [L,QSA

Thanks for your time, any info is good for me..  I have a drawer full of notes!
Davis VP2 
Blitzortung Stations: 1387  1445  2315
CWOP: EW1823
WU: KARHOTSP16
Cumulus
GRLevel3

hsnpar.com

Offline PaulMy

  • Forecaster
  • *****
  • Posts: 4877
    • KomokaWeather
Re: How to stop index.html from executing
« Reply #3 on: May 27, 2019, 11:42:18 PM »
Quote
assumed everything that Cumulus was uploading was needed.


The Cumulus template files upload ste optional and are not needed for the Saratoga template.  What is needed is the Cumulus realtime.txt to be uploaded and also the Saratoga CUtags to be processed and uploaded as extra files.  So turning of the Cumulus standard template xxx.htm files which includes index.htm is possible.


I have used but am not very familiar with .htaccess.


Enjoy,
Paul