• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter problem after upload to hosting

#1
Hello! I have problem with CodeIgniter!

When i launch server on XAMPP everything is working good:
[Image: localhost.png]


The problem take place when I put the code to my hosting on nazwa.pl. When I press button "Submit Post!" I get my hosting company page, that my site is hosted on nazwa.pl servers:
[Image: zewnetrzny.png]

I don't know where is the problem, mayby in configuration? 

Thanks for help!
Reply

#2
@Griwen,

That's were I would start. Maybe your base_url in your config file or maybe your action parameter in your form tag.
Reply

#3
@php_rocs

a have it in folder and now it's working but i don't know how, I added a line in .htacces:

RewriteBase /folderWithCI/

and in config:

$config['base_url'] = 'http://domain.pl/folderWithCI/';

Don't know why it's not working without that line in htaccess if i have subfolder declarated in baseurl
Reply

#4
If you do not declare a RewriteBase it will start looking for files at domain.pl, but you have your files in a folder (folderWithCI). So it give you an error message.

If you don't want a folder, specify: RewriteBase /
Reply

#5
Base URL should be absolute, including the protocol:
$config['base_url'] = "http://somesite.com/somedir/";
If using the URL helper, then base_url() will output the above string.

Passing arguments to base_url() or site_url() will result in the following (assuming $config['index_page'] = "index.php";:

echo base_url('assets/stylesheet.css'); // http://somesite.com/somedir/assets/stylesheet.css
echo site_url('mycontroller/mymethod'); // http://somesite.com/somedir/index.php/my...r/mymethod
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.