当我通过浏览器访问以下网址时,它可以正常返回 JSON 数据,
http://azcvoices.com/topcompanies/wp-content/themes/topcompanies/get.php?p=33
当 jquery 执行 ajax时,即使文件确实存在于服务器上,也会使用以下代码get
失败,如上所述,404 Not found error
get.php
$.ajax(
{
url: "http://azcvoices.com/topcompanies/wp-content/themes/topcompanies/get.php",
type: "GET",
data: {p: postId}
})
.done(function(post) {
})
.fail(function() { alert("error"); })
.always(function() { });
您可能会在下面看到 404 错误,
目前 .htaccess 包含以下内容,
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]
这会导致问题吗?
在http://peplamb.com/workspace/azcentral.com/spotlight-stories/测试服务器上的相同演示 工作正常,但相同的代码在http://azcvoices.com/topcompanies/spotlight-stories失败/
可能是什么问题?任何帮助是极大的赞赏!