CodeIgniter Forums
Copying remote site to localhost - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forum-9.html)
+--- Thread: Copying remote site to localhost (/thread-63351.html)



Copying remote site to localhost - ZandarKoad - 10-21-2015

So I'm trying to set up a local environment for testing and development. Obviously we use CodeIgniter as our framework.

But when I copy the whole server to the local server (I have XAMPP), and navigate to the root, all I see is a directory structure - it doesn't display anything at all that I would expect to see from the website.

I spent 4+ hours (over several days) trying every .htaccess and httpd.conf suggestion I could find on Google, stackoverflow, these forums, and more. I am able to get a 500 server error when adding garbage to the .htaccess file, so I know it's being processed. But I think my problem is possibly unrelated to the .htaccess file settings. (I don't really care if index.php shows up on the URL bar locally.)

There is no index.php on our server's root (again, our site is built with CodeIgniter). Nor anywhere else in the framework directory structure, (except /application/views/user/template/original). When I access the site live, in the URL bar it pulls up the domain name followed by: "/user/login". Looking into the /application/views/user folder shows a login_view.php, but when I try to access it directly, I get an Access Forbidden 403 error.

How is the site loading remotely, but not locally?


RE: Copying remote site to localhost - ZandarKoad - 10-24-2015

So it turns out they didn't have the proper .htaccess file in the Git repo that I cloned from. Nor did they have the root index.php file in that repo. I got those separately, changed the base_url in the application\config\config.php, and it's working!

I haven't figured out quite yet why those two files were not in the repo. Still waiting for feeback on that.


RE: Copying remote site to localhost - sv3tli0 - 10-24-2015

ZandarKoad is your local host enabled apache override all for the directory where are your site files?
This is regular problem with local env's.


RE: Copying remote site to localhost - ZandarKoad - 10-24-2015

(10-24-2015, 06:37 AM)sv3tli0 Wrote: ZandarKoad is your local host enabled apache override all for the directory where are your site files?
This is regular problem with local env's.

Yes, it was and is.  That's one of the first suggestions Google produced.

But I'm all set now that I have the all-critical index.php.