Firebug Shows 301 Moved Permanently

httphttp-status-code-301tinymce

Im using yii framework with tiny mce. When I run my website in localhost it works just fine. But when I upload to the server the editor doesnt show up. when I check in Firebug, it show :

http://www.ptbm.co.id/veevou/assets/dde67fde/tiny_mce/tiny_mce_gzip.php?s=true&diskcache=true&core=t…….

then the status is 301 moved permanently

This is the request code :

// Send request
    x = w.XMLHttpRequest ? new XMLHttpRequest() : get('Msxml2.XMLHTTP') || get('Microsoft.XMLHTTP');
    x.overrideMimeType && x.overrideMimeType('text/javascript');
    x.open('GET', t.baseURL + '/' + s.page_name + '?' + q, !!cb);
    //x.setRequestHeader('Content-Type', 'text/javascript');
    x.send('');

The url correctly pointing to existing file.

Anyone have any idea how to fix this? Thanks

Best Answer

Apparently your server redirects to a URL without the www prefix:

$ curl -I 'http://www.ptbm.co.id/veevou/assets/dde67fde/tiny_mce/tiny_mce_gzip.php?s=true&diskcache=true&core=t'
HTTP/1.1 301 Moved Permanently
Date: Fri, 18 Nov 2011 09:14:48 GMT
Server: Apache
X-Powered-By: PHP/5.3.8
X-Pingback: http://ptbm.co.id/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Last-Modified: Fri, 18 Nov 2011 09:14:49 GMT
Location: http://ptbm.co.id/veevou/assets/dde67fde/tiny_mce/tiny_mce_gzip.php?s=true&diskcache=true&core=t
Content-Type: text/html; charset=UTF-8

You could remove that RewriteRule, or make sure that t.baseUrl does not have any www prefix.

Without more code it is difficult to give any more exact pointers than that.

Related Topic