CodeIgniter Forums
Why Domain with Coeigniter App keeps reloading - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1)
+--- Forum: Regional User Groups (https://forum.codeigniter.com/forumdisplay.php?fid=25)
+--- Thread: Why Domain with Coeigniter App keeps reloading (/showthread.php?tid=82156)



Why Domain with Coeigniter App keeps reloading - luckmoshy - 06-17-2022

Hi gentle CI guys I face a chronic issue with the live working Codeigniter App the issue happened since I update from CI 4.1.9 to 4.2 betta, unfortunately, was not worked there were several bugs, exceptions, and errors which were occurred. Then I decide to use my old CI app (4.1.9) course was daily working fine, But since I did it for CI 4.2 and return back for CI 4.1.9 Now the URL (///) (domains) keeps reloading constantly nothing shows or the front page appears

I informed NAMECHEAP HOSTING CORPORATION of this issue thinking it is maybe a server issue but unfortunately, they found that was not a server issue
thereafter they told me to change My app to a new one or find a bug or issue in my app which I know was fine.

the scenario is like this it is true MY CI 4 App has no issue at all I see something like a magic issue which I don't understand at all like follows:

in this server, if I take this App and put it in another server the same hosted in NAMECHEAP it works fine but if I put it back to its server (///) does not work
we have tried to take another app from another server and put it here the same issue still persists

So I ask whoever has maybe faced such an issue what an Idea or course

and This is a Domain that you may go to and see how it constantly reloads ///

I know many will react perhaps it is an App issue but I reassure you That App it is Fine We have tested in Nginx and Apache servers and others no bugs it works fine except the domain URL constantly reload


RE: Why Domain with Coeigniter App keeps reloading - InsiteFX - 06-17-2022

If it is still doing with a different app then something got messed up on your server configuration.

See if you can get your provider to re-setup the server.

Also check your root index,php and index.html files.


RE: Why Domain with Coeigniter App keeps reloading - kenjis - 06-17-2022

Code:
CodeIgniter\Database\Exceptions\DatabaseException #8

Unable to connect to the database.
Main connection [MySQLi]: Access denied for user '****'@'localhost' (using password: NO)



RE: Why Domain with Coeigniter App keeps reloading - luckmoshy - 06-18-2022

(06-17-2022, 11:51 PM)kenjis Wrote:
Code:
CodeIgniter\Database\Exceptions\DatabaseException #8

Unable to connect to the database.
Main connection [MySQLi]: Access denied for user '****'@'localhost' (using password: NO)

yes @kenjis yes it is just now have told Namecheap to clean this host to be like a new one so they have wiped every thin in the database I wanted to do this in case there is something caused I know that I am going to create a new database and run migrate you will see it keeps reloading on the same since I have set in development it should give me an error in debug

I have Run All Migration see it does keeps reloading


RE: Why Domain with Coeigniter App keeps reloading - kenjis - 06-18-2022

It seems this is the cause of reloading.

Code:
      <!--ssl-->
      <script type="text/javascript" id="force_SSL_data_layer">
        var host = "dancingsimbasafaris.com";
        if ((host == window.location.host) && (window.location.protocol != "index.php"))
          window.location.protocol = "https";
      </script>

The if line should be:
Code:
        if ((host == window.location.host) && (window.location.protocol != "https:"))



RE: Why Domain with Coeigniter App keeps reloading - luckmoshy - 06-18-2022

(06-18-2022, 12:23 AM)kenjis Wrote: It seems this is the cause of reloading.

Code:
      <!--ssl-->
      <script type="text/javascript" id="force_SSL_data_layer">
        var host = "dancingsimbasafaris.com";
        if ((host == window.location.host) && (window.location.protocol != "index.php"))
          window.location.protocol = "https";
      </script>

The if line should be:
Code:
        if ((host == window.location.host) && (window.location.protocol != "https:"))

OK let me remove it

Dear @kenji, you are the best you made my day

Thank you so much @kenji you are really the best it has taken 3 weeks with 8 Namecheap assistant team could not tell me this you have shown a unique of you keenness I have removed js SSL which I could not understand personally .yes i received this app from other dev so i could not check property this Cheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeer @


RE: Why Domain with Coeigniter App keeps reloading - kenjis - 06-18-2022

window.location.protocol means the protocol of the URL.
Its value is http: or https: because we are using Web.
So the value will never be index.php.

If you set window.location.protocol, browsers will send another request of the protocol.

See https://developer.mozilla.org/en-US/docs/Web/API/Location/protocol


RE: Why Domain with Coeigniter App keeps reloading - luckmoshy - 06-18-2022

(06-18-2022, 12:41 AM)kenjis Wrote: window.location.protocol means the protocol of the URL.
Its value is http: or https: because we are using Web.
So the value will never be index.php.

If you set window.location.protocol, browsers will send another request of the protocol.

See https://developer.mozilla.org/en-US/docs/Web/API/Location/protocol

Yes, it is true at first this APP it was taken index.php in public and set it in the main root but for me, I left it in public and use .htaccess to public