Я установил модуль rest-api 2.0beta9wordpress 4.4 на El Capitan OSX 10.11.2.Wordpress API возвращает 404 в OSX (постоянные ссылки включены)
Я изменил /etc/apache2/httpd.conf
бежать, как мой пользователь, так что он может легко обновить Sites
файлы:
User jtosey
Group staff
Я также включен AllowOverride All
в пользовательском конф:
$ cat /etc/apache2/users/jtosey.conf
<Directory "/Users/jtosey/Sites/">
AddLanguage en .en
LanguagePriority en fr de
ForceLanguagePriority Fallback
Options Indexes MultiViews
# required for REST API:
AllowOverride All
Order allow,deny
Allow from localhost
Require all granted
</Directory>
И I я изменил свои постоянные связи, которые вызвали .htaccess
:
$ cat /Users/jtosey/Sites/wordpress/.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~jtosey/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~jtosey/wordpress/index.php [L]
</IfModule>
я могу легко скручиваться на главную страницу:
$ curl http://localhost/~jtosey/wordpress/
<!DOCTYPE html>
<html lang="en-CA" class="no-js">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>
<title>AAA – Car Culture</title>
Но я получаю 404 на API:
$ curl http://localhost/~jtosey/wordpress/wp-json/
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /~jtosey/wordpress/wp-json/ was not found on this server.</p>
</body></html>
Любые идеи?