MAMP PRO new Custom Site / host will not open or load in browser

376 views Asked by At

I am running MAMP PRO 6.8.1 on a MacBook with a M1 chip running macOS X Ventura 13.2.1.

The default index.php page for the 'localhost' Host loads fine when I click the "Open" button for that site.

However, when I click the "Open" button for the new Custom site I created, instead of opening the site, it downloads the index.php page. Using the "Open" button opens a browser tab to https://[my-new-host-name]:8890

In case there was something wrong with my custom site or its index.php page, I renamed index.php to index_old.php and put a copy of the MAMP - provided index.php file from 'localhost' into my new host folder. Same problem - instead of loading the index.php file in a browser window, it downloads the file.

Tried with both Firefox and Chrome.

I tried changing the index.php file, and I tried different browsers, and I tried disabling the SSL certificate. Nothing changed.

3

There are 3 answers

0
user5035 On

In this case the failure to load was because there was an old .htaccess file in the folder from when the site was on cPanel hosting. I deleted the .htaccess file and now the site loads.

The answer was provided to me by Dirk Einecke on the MAMP Pro Bugbase website.

After deleting the .htaccess file, I was then able to rename the index.php files to restore my original index.php file, and then the site came up. Problem solved.

0
AdamJones On

It is indeed very likely to be a .htaccess issue. On OSX ensure you are seeing hidden files in the finder by using Apple Function / Shift / "." chr together.

Rather than deleting the file though I would suggest you try to work out why it doesn't work or disable a lot of its functionality via the MAMP Pro UI.

To do the first, check the .htaccess for all the modules it loads. Then check that all those modules are enabled in the MAMO Pro UI in the 'Apache' settings screen.

To try and disable most of the htaccess go to the 'Hosts' screen, select your host and then find the "Allow Override" option and instead of "All" select the radio button to the right, which defaults to a value of "None".

0
Shrikant Kumar On

It's highly probable that the issue you're experiencing is related to the .htaccess file. If you're using OSX, make sure you're able to view hidden files in the finder by pressing Apple Function / Shift / "." keys simultaneously.

Instead of deleting the file, I recommend that you try to identify the root cause of the problem or disable some of its features through the MAMP Pro interface.

To identify the root cause, check the .htaccess file for all the modules it loads. Then, make sure that all these modules are enabled in the Apache settings screen of the MAMP Pro user interface.

If you prefer to disable most of the hatches file's features, go to the Hosts screen, select your host, and find the "Allow Override" option. Instead of choosing "All", select the radio button to the right, which defaults to "None".