当我将域名从CodeIgniter更改为www.poetnpoetry.com时,会出现错误(在www.poetnpoetry.com中)。这是我在尝试从AJAX登录或提交表单时收到的错误。
XMLHttpRequest无法加载。“访问-控制-允许-原产地”标题包含无效值“www.poetnpoetry.com”。因此,“”源是不允许访问的。
我通过使用poetnpoetry.com文件更改了域:
RewriteEngine On
#This bit rewrites your host name to include www
RewriteCond %{HTTP_HOST} !^w