Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter redirect to localhost after online migration
#1

I just uploaded my application on my hosting account, the account is provided by Hostinger. You can see the link here.

Configuration file:
Code:
<?php
class SystemConfiguration {
// General Settings
public static $base_url    = 'http://primodebug.esy.es/Calendario/';
// Database Settings
public static $db_host     = 'mysql.hostinger.it';
public static $db_name     = 'u460105738_primo';
public static $db_username = 'u460105738_ferve';
public static $db_password = '*****';

CodeIgniter config.php file (It's too long to paste here).

.HTACCESS

Code:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

I also have other problems logging probably related files .httaccess I have no idea, but it seems that some javascript files are not loaded properly. What can be?
Reply
#2

(This post was last modified: 11-27-2015, 08:14 AM by arma7x. Edit Reason: Misunderstood )

Try manually replace base_url value in config.php
Keep calm.
Reply
#3

(11-27-2015, 08:10 AM)arma7x Wrote: Try manually replace base_url value in config.php

Hi there, thanks for the reply. I've changed like so:

PHP Code:
$config['base_url'] = "http://primodebug.esy.es/Calendario/"

but how you can see the app still go in localhost...
Reply
#4

What is your default controller? Request to http://primodebug.esy.es/Calendario always redirect to http://localhost/Calendario/user/login. Try check your default controller. Another question, why put your web based folder in public_html??
Keep calm.
Reply
#5

(This post was last modified: 11-27-2015, 10:45 AM by JackIlpazzo.)

(11-27-2015, 09:26 AM)arma7x Wrote: What is your default controller? Request to http://primodebug.esy.es/Calendario always redirect to http://localhost/Calendario/user/login. Try check your default controller. Another question, why put your web based folder in public_html??

I put the application "Calendario" folder in public_html 'cause in the root of the system there's a file the specific 'do not upload file here'. Why this question? As you saw in my configuration file I call this variable: 

PHP Code:
$config['base_url']    = SystemConfiguration::$base_url

the content of this variable is:  http://primodebug.esy.es/Calendario
I've also try to change into:

PHP Code:
$config['base_url'] = "http://primodebug.esy.es/Calendario" 

But still redirect on localhost..

UPDATE:

If I insert this url: http://primodebug.esy.es/Calendario/user/login

The application login is loaded correctly but if I try to login with this credential:

Username: Test
password: 123456789

(just for debug scope).

Seems that the server doesn't return any data response.. But I've checked the login is performed successfully.
Reply
#6

My question is what is your default controller? Request to http://primodebug.esy.es/Calendario always redirect to http://localhost/Calendario/user/login. Try RECHECK YOUR DEFAULT CONTROLLER IF YOU HAVE CONDITION THAT CAUSE USER TO REDIRECT TO LOGIN PAGE AND DOES THE REDIRECTION LINK IS CORRECT. Put index.php & assets in your public_html. SYSTEM AND APPLICATION FOLDER you can put in same directory as index.php but for safety put in below directory of index.php
Keep calm.
Reply
#7

(This post was last modified: 11-27-2015, 11:06 AM by JackIlpazzo.)

(11-27-2015, 10:50 AM)arma7x Wrote: My question is what is your default controller? Request to http://primodebug.esy.es/Calendario always redirect to http://localhost/Calendario/user/login. Try RECHECK YOUR DEFAULT CONTROLLER IF YOU HAVE CONDITION THAT CAUSE USER TO REDIRECT TO LOGIN PAGE AND DOES THE REDIRECTION LINK IS CORRECT. Put index.php & assets in your public_html. SYSTEM AND APPLICATION FOLDER you can put in same directory as index.php but for safety put in below directory of index.php

Okay I solved the problem of the localhost, now if you try to achieve the following url:

http://primodebug.esy.es/Calendario/

you can see that it works. But there remains the problem of the login, locally it works fine, but here it seems that the files are uploaded to the network tab I get no answer, I will probably require a change to the .htaccess file?
Reply
#8

(This post was last modified: 11-27-2015, 11:36 AM by arma7x. Edit Reason: Add more details )

I'm still having redirect issue to http://localhost/Calendario/user/login when click http://primodebug.esy.es/Calendario/
Keep calm.
Reply
#9

(11-27-2015, 11:35 AM)arma7x Wrote: I'm still having redirect issue to http://localhost/Calendario/user/login when click http://primodebug.esy.es/Calendario/

I've noticed, the problem is back but do not know why when I reloaded the files everything worked. I think it's a problem of .htaccess files, but do not know how to configure it, you can help solve?
Reply
#10

(This post was last modified: 11-27-2015, 12:15 PM by arma7x. Edit Reason: Add detail.... )

The problem occur when redirect to login page which mean your auth system? Did you use community auth or tank auth? Or using your own auth system?
Keep calm.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB