2012-02-06 22 views
0

我的網站是由WordPress的。的WordPress的.htaccess塊現有文件

我有這個腳本坐在/new/fetch-online-users.php,我打電話通過(jQuery)ajax在/new/index.html(與$.getJSON())。

我查詢該腳本每10秒通過setInterval()

然後每一個現在,調用失敗,並給出了404。如果我看螢火蟲的迴應,我看到它顯示WordPress的404頁。在其他時候,它工作正常。

我仔細檢查所有的.htaccess和它的罰款:

# BEGIN WPSuperCache 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible 
RewriteCond %{REQUEST_METHOD} !POST 
RewriteCond %{QUERY_STRING} !.*=.* 
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$ 
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC] 
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] 
RewriteCond %{HTTP:Accept-Encoding} gzip 
RewriteCond %{HTTPS} on 
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index-https.html.gz -f 
RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index-https.html.gz" [L] 

RewriteCond %{REQUEST_METHOD} !POST 
RewriteCond %{QUERY_STRING} !.*=.* 
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$ 
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC] 
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] 
RewriteCond %{HTTP:Accept-Encoding} gzip 
RewriteCond %{HTTPS} !on 
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f 
RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz" [L] 

RewriteCond %{REQUEST_METHOD} !POST 
RewriteCond %{QUERY_STRING} !.*=.* 
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$ 
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC] 
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] 
RewriteCond %{HTTPS} on 
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index-https.html -f 
RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index-https.html" [L] 

RewriteCond %{REQUEST_METHOD} !POST 
RewriteCond %{QUERY_STRING} !.*=.* 
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$ 
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC] 
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] 
RewriteCond %{HTTPS} !on 
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f 
RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L] 
</IfModule> 

# END WPSuperCache 

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

# END WordPress 

什麼可以解釋偶爾的失敗?

+0

幾乎所有的託管服務提供商使可用於分析的access.log。你看着這些的URI的比較成功和404個請求?沒有什麼能夠證明你的理解。 – TerryE 2012-02-07 10:43:18

回答

0

嘗試添加RewriteRule ^new/ - [L]到您的htaccess的絕對頂部。