我需要在一个页面上的JS检查推荐人-前一页-来自相同的领域。
包含JS的页面的URL格式如下:
可能有多个以前的页面。因此,JS需要检查域名是否匹配。
如果域名不同,我想将用户发送到另一个页面。
这就是我想要做的:
var matchHost = /^https?:\/\/.*\//;
var match = matchHost.exec(document.referrer);
var domain = "http://subdomain.site.com/dir/";
if (match !== domain) {
window.location.href = do
正如我注意到的,来自google的类包含以下常量:
private static final int MAX_LENGTH = 253;
下面的代码在创建InternetDomainName实例时检查长度:
checkArgument(name.length() <= MAX_LENGTH, "Domain name too long: '%s':", name);
但是RFC-2181说:
A full domain name is limited to 255 octets (including the separators).
那么,域名的有效最大
当使用abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl作为我的子域创建新记录时,我会得到以下错误。
(InvalidChangeBatch 400: DomainLabelTooLong (Domain label is too long) encountered with 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl')
在中,我找到了以下语句。
域名的总长度不能超过255个字节,包括点。
我的根域长度是
? ? 已确保证书位于N.Virginia区域。我还尝试键入域名,出现以下错误: com.amazonaws.AmazonServiceException: 1 validation error detected: Value '*.domainname.com ' at 'serverCertificateId' failed to satisfy constraint: Member must have length less than or equal to 32 (Service: AmazonCloudFront; Status Co