2

I have a CodeIgniter project which works perfectly on my local. But when I try to put it on the live server (windows server 2008) it only loads the navbar which is included on my header.php. but the rest of the page doesn't show up.

I also check on developer tool on chrome but the XHR section under network tab is empty which is on my localhost has the list of js function that is running.

My .htaccess looks like this in case it has something to do with it.

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

Anyone who has an idea of what should be done. Thanks.

4
  • is there any errors to show? Commented Mar 17, 2018 at 8:04
  • @MeysamMahmoodi there are no errors. It seems that javascripts are not loaded for some reason. Commented Mar 17, 2018 at 8:09
  • did you get empty response from server? Commented Mar 17, 2018 at 8:15
  • I don't know what do you mean by empty response from server. But when I try to load the js inside <head></head> just after the css which I usually load before </body>, some of the functionality runs. Commented Mar 17, 2018 at 8:22

1 Answer 1

1

Just tryout this solution: First change this valiables in /application/config/config.php

$config['base_url'] = 'http://example.com/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

Then change in .htaccess file

RewriteEngine on
RewriteBase /

RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

Not sure whether any issue with loading in windows server as not yet tried.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.