I've installed a magento site locally with MAMP and the homepage works. However, when I go to any other page so products for example I'm getting an 404 error. If I change the url to include index.php it works though.

So for example my homepage url is http://localhost:8888/test-site/

If I got to http://localhost:8888/test-site/accessories I'm getting a 404 error

However, if I go to http://localhost:8888/test-site/index.php/accessories it works

I've changed the base_url etc. in the db to http://localhost:8888/test-site/ . so that shouldn't be the issue. Any ideas what the issue could be?


1 Answer 1


You need to check for Apache's mod_rewrite module. If the module is not installed, please install and enable it first.

Then, you need to login to admin panel and go to Stores > Configuration. Under General > Web section, change the value of Use Web server Rewrites to Yes and save the configuration.

Flush Magento's Cache and check the frontend now.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.