Magento网站迁移到MAMP localhost。 但是主页正在运行,但链接不是。

I downloaded a Magento website from a server and downloaded the database too. I followed some instructions to get the database working. I was required to change app/etc/local.xml and the base_url in the database.

See base_url

When I load the base_url address in the browser I get my website;

See website homepage

If I take public_html out of the base_url and just load localhost the styles don't work at all. So I guess I need public_html in the base_url

My problem is that whenever I click a link, I get a 404 error - this is the url localhost/public_html/mens/tees

I read some stack overflow posts about .htaccess file, but I'm not entirely sure how to configure it to work for me?

.htaccess file here

Any help would be welcome. Thank you

remove 'public_html' from your base_url database setting.

it should be

http://localhost/

your htaccess has:

RewriteBase /

this means apache is expecting no folder in the base url.

alternatively

if you want to have public_html in the url for some reason, just change your htaccess to:

RewriteBase /public_html/