2010-09-21 30 views
0

我開發了一個插件,可以在單個網站WP上正常工作。
但是,當使用子域在WPMU上測試它時,出現404 Not Found錯誤。jQuery.load給我一個404在WPMU找不到

奇怪的是,即使我收到錯誤消息,內容也會被加載 - 但內容從不顯示。

您可以在這裏看到的截圖:
http://www.stiengenterprises.com/download/tmp/jQuery_load_error.png

jQuery的代碼如下所示:

jQuery.post("/wp-content/plugins/wp-eventcal/eventcal_jquery.php", { instance: 'getEvent', eventID: eventID }, 
    function(event) 
    { 
    alert(event); // For testing - never fires 

    }, "json"); 

我怎麼能解決這個問題有什麼建議?

的.htaccess

# BEGIN WordPress 

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).*) $2 [L] 
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] 
RewriteRule . index.php [L] 

# END WordPress 
+0

我想你需要看看htaccess – 2010-09-21 04:08:10

+0

我對'.htaccess'文件沒有任何線索。所以如果你在這裏看到任何異常,請讓我知道:) – Steven 2010-09-21 08:36:58

回答

5

發生此問題,因爲您的eventcal_jquery.php不包括WordPress的框架,所以當它叫,WP返回404就包括header('HTTP/1.1 200 OK');包括可溼性粉劑博客 - header.php文件後在你的eventcal_jquery.php

+0

當!有效!你沒有ida我有多少努力與此!非常感謝! :)下次你在挪威時,我會給你買一瓶啤酒! :) – Steven 2010-09-21 08:46:38