草庐IT

property_get

全部标签

seo - 错误 : Page contains property "query-input" which is not part of the schema

我从GoogleRichSnippetstestingtool得到这个错误:Error:Pagecontainsproperty"query-input"whichisnotpartoftheschema.但是我哪里弄错了?HTML:PressEntertosearchJSON-LD:{"@context":"http://schema.org","@type":"WebSite","url":"https://domain.com/","potentialAction":{"@type":"SearchAction","target":"http://domain.com/searc

php - 如何使用 $_GET 参数制作 seo 友好的 url?

我正在使用自己制作的PHPCMS。它获取$_GET参数url并将其转换为www.website.com/{url}。此CMS使用$_GET参数获取文件。因此,如果url是index,则CMS会搜索文件index并返回文件的内容。但是现在,我正在扩展CMS以添加一个参数,例如profile/{username}。我该如何扩展它?我希望我的URL是www.website.com/profile/{username}。我该怎么做呢?这是我当前的htaccess:RewriteEngineOnRewriteRule^(|/)$index.php?url=$1RewriteRule^([a-zA

php - HTACCESS 友好 url 并允许 GET 方法

我的代码是Options-MultiviewsRewriteEngineOnRewriteBase/RewriteRule^([a-z0-9-]+)\.html$/index.php?cat=$1[L]如果我访问mysite.com/name-of-category.html它有效,但如果我访问mysite.com/name-of-category.html?anything=something它显示了网页,但$_GET["anything"]什么也没显示。 最佳答案 您必须指定一个名为QSAor'QueryStringAppend

java - 我可以阻止蜘蛛访问带有特定 GET 参数的页面吗?

我们有一个页面可以选择将ID作为GET参数。如果提供的ID无效,页面将抛出错误并发出通知,告知有人错误地访问了该页面。火上浇油的是ID可以有效期一段时间,然后过期。我们遇到了一个问题,即搜索引擎机器人使用旧的、过期的ID访问页面。这意味着我们每次被抓取时都会收到一堆“误报”警报。我很想有一些方法告诉机器人继续抓取页面,但不使用GET参数——只是索引无参数的页面。这甚至可以通过robots.txt文件或类似文件实现吗?注意:我知道解决此问题的最佳方法是更改​​页面的行为,事实上,这将在几周内发生。在此期间,我只是在寻找解决方案。 最佳答案

seo - Google 和 Bing 爬虫是否将 URL 中的主题标签视为 GET 参数?

一般考虑爬虫http://server/page和http://server/page?parameter=1两个不同的URL。Google和Bing爬虫如何考虑哈希标记URL,例如http://server/page#hash?根据http://www.tynt.com/support/faq#technical哈希标签后的所有内容都将被忽略。是否有其他消息来源证实了这一点? 最佳答案 您的来源是正确的。散列标签(也称为URL片段)之后的所有内容通常都会被忽略。原因是,URL片段通常仅由浏览器使用,不会导致从服务器提取其他信息。所

使用 GET 参数时 Apache Redirect 301 失败,例如 ?blah=

我为客户构建了一个新的PHP网站,并希望将排名靠前的Google结果从旧网站结构重定向到新网站结构。我已经在documentroot的.htaccess中放置了几十个重定向301,虽然有些工作正常,但我遇到了其他一些问题。这很好用:Redirect301/nl/flash/banner_new.swfhttp://www.example.com/actueel/nieuws.html?action=show&f_id=152这行不通!(导致404,因为重定向被简单地跳过):Redirect301/nl/index.php?mID=24511&subID=0http://www.exam

seo - 验证错误 : "The itemprop attribute was specified, but the element is not a property of any item"

为了更好的SEO,我需要像这样在我的页面上放置一些元数据:Hereisthesource.然后我在MarkupValidationService上检查这段代码:MytitleMybody.抛出这个错误:Line4,Column57:Theitempropattributewasspecified,buttheelementisnotapropertyofanyitem.Line5,Column70:Theitempropattributewasspecified,buttheelementisnotapropertyofanyitem.Line6,Column68:Theitempro

c++ - (cin >> int).get() 在 Xcode(4.3.3) 中无法正常工作

我目前正在编写“C++PrimerPlus”一书并进行一些编程练习。看起来,我在使用Xcode(4.3.3)时遇到问题,因为以下代码无法正常工作:#include#includestructcar{std::stringmaker;intyear;};intmain(){usingnamespacestd;cout>nCars).get();car*aCars=newcar[nCars];for(inti=0;imaker);cout>(aCars+i)->year).get();}coutyearmaker问题是,我没有机会进入任何制造商。该程序直接转到我必须输入年份的位置,即使我使

c++ - 编译器如何传递 `std::initializer_list` 值? (或 : how can I get around a universal overload with one? )

Continuingmysaga,我意识到我可以使用单个std::initializer_list参数来重载我的访问函数:classarray_md{//...my_type&operator[](size_typei){/*Lotsofcode*/}my_typeconst&operator[](size_typei)const{/*sameLotsofcode,with"const"sprinkledin*/}my_type&operator[](std::initializer_listi){/*Lotsofdifferentcode*/}my_typeconst&operato

c++ - 使用 BOOST::associative property map 插入 boost::BIMAP ... 失败

引用我之前提出的关于boost::bimaps和boostassociativepropertymaps接口(interface)的问题here,我想为我的bimap使用Put和Get辅助函数。引用给出的示例代码here,我尝试添加以下内容,但由于断言失败而出现很长的编译错误...这是代码:#include#include#include#includeusingnamespaceboost;intmain(){typedefintvertex_descriptor_t;typedefboost::bimaps::bimapvd_idx_bimap_t;typedefboost::as