简体   繁体   中英

google search results - append custom parameter to url string

how do you append an additional url parameter to a link in your google search results? is it possible to do this within the style sheet?

for example i have domain.com/result.htm - i want to change the link to domain.com/result.htm?param=1

thank you

That´s quite simple. On the default stylesheet find this code snippet:

    <xsl:otherwise>
      <xsl:value-of disable-output-escaping='yes' select="U"/>
    </xsl:otherwise>

If you want to append a fixed param like in your example, changeit by:

    <xsl:otherwise>
      <xsl:value-of disable-output-escaping='yes' select="U"/>
      <xsl:value-of select="'?extra=param'"/>
    </xsl:otherwise>

This will append to any url a "?extra=param"

HTH

如果谷歌没有像这样爬行它,我不认为它会像这样索引它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM