Web based family history software

file Question HTTP 200 and 301 headers

  • makitso
  • makitso's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
1 week 2 days ago #116958 by makitso
HTTP 200 and 301 headers was created by makitso
I have a sitemap.xml file on both on my local dev machine and my production system.  I thought I had done a pretty good job with construction these files but recent testing showed them to be an absolute mess :-((
Anyway, I have two url's for testing.  I am looking at the headers for each queries below.
query 1:    skatekey.net/tree/peters/individual/I0001/Johannes-Peters
query 2:    skatekey.net/tree/peters/individual/I0001
Both queries work.  But, query one returns a HTTP 200 header and query 2 returns an HTTP 301 header.
The test site uses pretty URLs.  I have removed every significant thing from the .htaccess file.  
My question is, why a 301 header?
 

Rob
www.skatekey.net ( webtrees 2.2.6
webtrees forum admin
Author custom css module
PHP 8.3.30
Hosted at tigertech.net

Please Log in or Create an account to join the conversation.

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
1 week 2 days ago - 1 week 2 days ago #116959 by bertkoor
Replied by bertkoor on topic HTTP 200 and 301 headers
I don't think something is wrong here.

A full url to a person consists of:
/tree/{tree}/individual/{xref}/{slug-name}
Your second example misses the slug-name part, so you get redirected. That's the 301 status code.
And your sitemap contains only full correct urls.

stamboom.BertKoor.nl runs on webtrees v2.2.6
Last edit: 1 week 2 days ago by bertkoor.

Please Log in or Create an account to join the conversation.

More
1 week 1 day ago #116965 by fisharebest
Replied by fisharebest on topic HTTP 200 and 301 headers
If the slug is missing or just *different* to the expected slug, then you will get a redirect only the current page.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum