我正在尝试在计算机上设置本地WP环境。我的.htaccess文件(与index.php文件位于同一文件夹中)如下:
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我的MAMP数据库每次都应正确设置我尝试在浏览器中查看该网站,得到:
My MAMP database should be set up correctly Every time I try to view the site in my browser, I get:
未找到在此服务器上找不到请求的URL / wordpress。 Not Found
The requested URL /wordpress was not found on this server.
我的wp-config.php文件如下所示:
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');我没有尝试移动任何东西,所以我没有在尝试更新永久链接。我尝试更改MAMP上的端口,尝试各种URL字符串(包括端口号,尝试导航到站点内的特定页面,等等。)我尝试了在此服务器上找不到请求的URL / about 和WP的指南(尽管它们似乎
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!
这是我的文件夹结构(在我的站点文件夹中,这是MAMP指向的位置): 文件夹结构的屏幕截图
Here's my folder structure (in my sites folder, which is where MAMP is directed): screenshot of folder structure
推荐答案a2enmod重写
服务apache2重新启动
更多推荐
在此服务器上找不到请求的URL /登录
发布评论