Welcome Guest, Not a member yet? Register   Sign In
Why Domain with Coeigniter App keeps reloading
#1

(This post was last modified: 06-18-2022, 12:39 AM by luckmoshy.)

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
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#2

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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Code:
CodeIgniter\Database\Exceptions\DatabaseException #8

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

(This post was last modified: 06-18-2022, 12:21 AM by luckmoshy.)

(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
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#5

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:"))
Reply
#6

(This post was last modified: 06-18-2022, 12:37 AM by luckmoshy.)

(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 @
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#7

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...n/protocol
Reply
#8

(This post was last modified: 06-18-2022, 12:49 AM by luckmoshy.)

(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...n/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
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply




Theme © iAndrew 2016 - Forum software by © MyBB