0

I need to change/rearrange a website built by a developer I don't have contacts to, but I'm having a problem with setting up the local test server.


I've downloaded all of the website's "public_html" files through FTP and they appears as below. (numbers indicate which level they're located in)

0.public_html
1.resources

2.subfolder
3.index.blade.php (includes content for index page)
3.template.blade.php (includes contents i.e. for index)

2.public
3.index.php (loads laravel php framework, no other code included)


When I open the page source code of the index page (through chrome), it reads contents from index.blade.php, template.blade.php, and other php files into one html document.

I'm using MAMP on mac, and when I set the document root to "public" where index.php is located I get an error message:

This page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500

When I set the document root to "public_html" I get an index of folders in "public_html", including "public" and "resources"

How do you set up a localhost for a website like this (index.php loading multiple php files from folders outside of "public" folder)? Is it possible?

ps: Hope I made sense, if not I can clarify. I've worked with html/css/js and wordpress sites but am a complete noob with php. Any help would be much appreciated. Thanks in advance!

while Adrian
  • 43
  • 1
  • 4
  • what happens when you go to `localhost/public/index.php` you probably have to do some stuff with `htaccess` or `virtual hosts` – ArtisticPhoenix Nov 23 '17 at 01:04
  • says "This site can’t be reached localhost refused to connect." will look into those 2 options thanks for your advice – while Adrian Nov 23 '17 at 05:46
  • Sure, In `htaccess` look into `RewriteBase` https://stackoverflow.com/questions/704102/how-does-rewritebase-work-in-htaccess – ArtisticPhoenix Nov 23 '17 at 05:47
  • when I tried adding RewriteBase /public/ in an existing .htaccess file in "public" folder & MAMP document root to "public" I got an "internal server error" message. looking more into it but is this along the line of what you were suggesting? – while Adrian Nov 23 '17 at 21:07

0 Answers0