Bienvenue, Invité
Nom d'utilisateur : Mot de passe :


If you need to upgrade your PGV installation, then hopefully you will also consider that you can conveniently move to webtrees with our PGV-to-webtrees wizard. It will move ALL your users, news, favorites and family trees to webtrees in a matter of minutes.

SUJET : [SOLVED] How can I make the 301 redirect rule take effect

How can I make the 301 redirect rule take effect il y a 7 mois 1 semaine #1

  • xmlf
  • Portrait de xmlf
  • Hors Ligne
  • New
  • Messages : 67
I have switched from phpgedview to webtrees. The URL structure of webtrees and phpgedview is different.
I want to use the Rewrite rule for 301 redirects. I configured the redirect rule in nginx, but it doesn't work.
I checked that the default setting for webtrees is that it can still be accessed using the old URL of phpgedview.
This can result in a lot of duplicate content appearing on two different URLs. This is very unfriendly to search engines.
How can I make the 301 redirect rule take effect?
Wang Family Website of Suining County, China
https://www.snwsjz.com
A family tree website that is customized, more humanized and convenient for users.
L'administrateur a désactivé l'accès en écriture pour le public.

How can I make the 301 redirect rule take effect il y a 7 mois 1 semaine #2

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Messages : 11543
> I configured the redirect rule in nginx

Can you share the nginx configuration?

> but it doesn't work.

What happened? Give an example?
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net
L'administrateur a désactivé l'accès en écriture pour le public.

How can I make the 301 redirect rule take effect il y a 7 mois 1 semaine #3

  • xmlf
  • Portrait de xmlf
  • Hors Ligne
  • New
  • Messages : 67
Nginx rule:
rewrite ^/individual.php?pid=(.*)&ged=(.*) /index.php?route=individual&xref=$1&ged=$2 permanent;

Example:
www.zisun.org/individual.php?pid=X333&ged=ke
And
www.zisun.org/index.php?route=individual&xref=X333&ged=ke

Both can access the same content. And the return http status code is 200.
Wang Family Website of Suining County, China
https://www.snwsjz.com
A family tree website that is customized, more humanized and convenient for users.
L'administrateur a désactivé l'accès en écriture pour le public.

How can I make the 301 redirect rule take effect il y a 7 mois 1 semaine #4

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrator
  • Messages : 11543
Perhaps this rule is applied *after* your existing rules.

Since there is already a file individual.php in webtrees, this one is used.

I guess the file in webtrees should be updated to return a 301. Raise a ticket on github.
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net
L'administrateur a désactivé l'accès en écriture pour le public.

How can I make the 301 redirect rule take effect il y a 7 mois 5 jours #5

  • xmlf
  • Portrait de xmlf
  • Hors Ligne
  • New
  • Messages : 67
Is my nginx rule configuration error.
In the nginx rewrite rule, the "?" processing method is different.
However, the old URL can still be browsed by default, which is still very unfriendly to search engines.
Wang Family Website of Suining County, China
https://www.snwsjz.com
A family tree website that is customized, more humanized and convenient for users.
L'administrateur a désactivé l'accès en écriture pour le public.

[SOLVED] How can I make the 301 redirect rule take effect il y a 7 mois 5 jours #6

  • xmlf
  • Portrait de xmlf
  • Hors Ligne
  • New
  • Messages : 67
Problem solved.
Wang Family Website of Suining County, China
https://www.snwsjz.com
A family tree website that is customized, more humanized and convenient for users.
L'administrateur a désactivé l'accès en écriture pour le public.
Propulsé par Kunena