0

I have a copy of PHP project running using CodeIgniter framework. It's hosted in some server and when I am trying to access a particular URL

www.xxxdomain.com/member/member/index

The above URL is loading a page with CSS

it I call the same link in the below manner still the page is loading but it couldn't load CSS

www.xxxdomain.com/member/index.php/member/index

now, when I download this code and trying to run in my own localserver when I am trying to call as http://localhost/project1/member/member/index I am getting an 404 error at the same time when I call it as http://localhost/project1/member/index.php/member/index the desired page is loading but loading without CSS.

How come the page load with the same URL in my server and not running in my localhost?? I changed the base_url setting and I am pretty high sure that I replaced all instances with the localhost url instead of server url but still the issue persists.

Any idea how to fix this?

Karthik Malla
  • 5,570
  • 12
  • 46
  • 89

1 Answers1

4

create a file .htaccess in your root CI folder in you localserver...

and paste this Rewrite code..

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

if you want to read more about htaccess..

make sure u leave your config index_page blank....$config['index_page'] = "";

bipen
  • 36,319
  • 9
  • 49
  • 62