Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2021-01-01 05:43:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,451
Website

Re: [SOLVED] prevent indexing of urls with ?

etc wrote #327953:

Why +?

Because I am and idiot!!! Thanks so much to all! Oleg’s suggestion solved it!


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#12 2021-01-03 09:36:01

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,453
Website

Re: [SOLVED] prevent indexing of urls with ?

etc wrote #327953:

Why +?

<txp:evaluate query='contains("<txp:page_url />","?accept_")'>...

Oleg:

Maybe it’s simpler to do:

<txp:evaluate query='contains("<txp:page_url />","?accept_")'>
<txp:header name="HTTP/1.1 503 Service Temporarily Unavailable" />
<txp:header name="Status" value="503 Service Temporarily Unavailable" />
<txp:header name="Retry-After: 3600" /></txp:evaluate>

But unfortunately, header response in my browser isn’t correct. Can you explain to me why? Thanks.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#13 2021-01-03 09:52:31

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 210
Website

Re: [SOLVED] prevent indexing of urls with ?

Another way to discourage search engines from indexing such content is with robots.txt:

User-agent: *
Disallow: /?*

Offline

#14 2021-01-03 10:41:25

etc
Developer
Registered: 2010-11-11
Posts: 4,051
Website

Re: [SOLVED] prevent indexing of urls with ?

Pat64 wrote #327985:

unfortunately, header response in my browser isn’t correct. Can you explain to me why? Thanks.

Hi Patrick, try

<txp:header name value="503" />
<txp:header name="Status" value="503 Service Temporarily Unavailable" />
<txp:header name="Retry-After" value="3600" />

Another possibility is nameless headers:

<txp:header name="" value="Retry-After: 3600" />

Offline

#15 2021-01-03 11:38:27

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,453
Website

Re: [SOLVED] prevent indexing of urls with ?

etc wrote #327987:

[…]

Another possibility is nameless headers:

<txp:header name="" value="Retry-After: 3600" />...

Thanks. Simpler! But, unfortunately, it seems the header response isn’t good (no changes observed into the browser headers viewer)…

kuopassa wrote #327986:

Another way to discourage search engines from indexing such content is with robots.txt:

User-agent: *
Disallow: /?*

Yep! Maybe the simplest and efficient way (I didn’t think of it) Winner 🤘

Last edited by Pat64 (2021-01-03 11:43:31)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB