Wednesday, 14 August 2013

CodeIgniter default page on remote server

CodeIgniter default page on remote server

I'm relatively new to CI and I'm wondering if anyone knows how to set the
default page of CI. I just transferred my files from my local server to my
remote server and am having some problems. Firstly, I think it's important
to note that I edited the .htaccess file so that the index.php was removed
from the URL.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Secondly, in my config.php file, I have
$config['base_url'] = '';
$config['index_page'] = 'sportstream';
"sportstream" is the name of a controller that is found in the
"application/controllers/" folder. From my experiences without using CI
(or any other framework), the index.php file inside of the public_html
folder on the remote server is the one that is loaded by default upon
visiting a site. But, with CI, whenever I try to visit my domain name, a
404 error is returned. I have tried setting to base_url to
http://www.mysite.com without any luck.
Does anyone here know how to make it so that upon visiting
http://www.mysite.com. http://www.mysite.com/sportstream will be loaded?
Thanks

No comments:

Post a Comment