Weblurk
Weblurk

Reputation: 6802

Permalinks don't work on WordPress installation on MAMP.

I followed this guide for installing WordPress multisite on MAMP: http://perishablepress.com/wordpress-multisite-mamp/

And it seems to be working fine. I can access WordPress admin, and the site itself. However, whenever I create a page and try to visit it, I get an 404 error, as if the permalink url is broken or something, but I can't figure out what's wrong.

Example:

My htaccess file looks like this, in accordance with the guide I followed:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

Upvotes: 0

Views: 2572

Answers (2)

Bud Damyanov
Bud Damyanov

Reputation: 31829

You can remove your custom-edit from your .htaccess file and edit the permalinks settings (i.e. revert to default), save the changes. This way Wordpress will be forced to re-generate it (if it has any errors) and everything should work.

This .htaccess file should be located in root of your Wordpress installation (you may have other .htaccess files in sub-folders as well).

Upvotes: 2

Harish Kanakarajan
Harish Kanakarajan

Reputation: 685

Just go to Wordpress admin page,

then Click on Settings > Permalinks,

Then Click Save Changes.

This will be fixed.

Upvotes: 1

Related Questions