The requested URL /login was not found on this ser

2019-06-24 15:36发布

I'm trying to set up a local WP environment on my machine. My .htaccess file (which is in the same folder as my index.php file) looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

My MAMP database should be set up correctly Every time I try to view the site in my browser, I get:

Not Found

The requested URL /wordpress was not found on this server.

My wp-config.php file looks like this:

define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'root');

/** MySQL database password */
define('DB_PASSWORD', 'root');

/** MySQL hostname */
define('DB_HOST', 'localhost');

I haven't tried to move anything around, so I'm not trying to update permalinks. I've tried changing the ports on MAMP, trying various strings of URLs (including port number, trying to navigate to specific pages within the site, etc. I've tried everything suggested on The requested URL /about was not found on this server and WP's guidelines (though they seem to solve issues only after people have installed plugins — I'm just trying to set up the basic initial WP download).

Any suggestions? I'm at a total loss for what else to try. Any help is greatly appreciated — thank you!

Here's my folder structure (in my sites folder, which is where MAMP is directed): screenshot of folder structure

2条回答
Deceive 欺骗
2楼-- · 2019-06-24 16:09

a2enmod rewrite

service apache2 restart

查看更多
倾城 Initia
3楼-- · 2019-06-24 16:20

I have the same problem, and the solution was to activate the rewrite_module on the apache.

查看更多
登录 后发表回答