Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here.
  • Page:
  • 1

TOPIC:

The older version links that are shared with other websites do not work. 2 weeks 2 days ago #1

  • badmoonrising
  • badmoonrising's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • GNMPD-Editor (PHP ver 7.3.5)
  • Posts: 9
We recently upgraded to WT 2.0, and the older version links that are shared with Wikitree, Genie, Heritage, etc. are now nonworking links. How can this issue be fixed.
Attachments:

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

The older version links that are shared with other websites do not work. 2 weeks 2 days ago #2

  • norwegian_sardines
  • norwegian_sardines's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 2065
Ken

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

The older version links that are shared with other websites do not work. 2 weeks 2 days ago #3

I think this thread may be closer to the answer.

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

The older version links that are shared with other websites do not work. 2 weeks 1 day ago #4

(I'm working with badmoonrising on this problem)

I read that thread but it didn't solve it for us. I removed 1.7 before installing 2.0, so there are no old PHP files left behind. index.php is the only one at the top level.

The person who hinted the problem was with nginx didn't say what problem they found, so I don't know if there might have been a hint there. We're using apache and have this in .htacces:
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /webtrees/
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]
</IfModule>

In data/config.ini.php we have:
base_url="https://www.hgrc-nm.org/webtrees"
rewrite_urls=1

As badmoonrising said, pretty URLs are working, and if I manually convert an old link to the pretty URL syntax it will work. But visiting the old link directly does not work. Specific example links:
Old link: 
http://www.hgrc-nm.org/webtrees/individual.php?pid=I51149&ged=Great%20New%20Mexico%20Pedigree%20Database

Manually rewritten link:
http://www.hgrc-nm.org/webtrees/tree/Great%20New%20Mexico%20Pedigree%20Database/individual/I51149

Have I overlooked something in the pretty urls setup?

Thanks,

Mark

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

The older version links that are shared with other websites do not work. 2 weeks 1 day ago #5

Did you activate the Legacy URLs module?
webtrees 2.0.16 at visitusinmaputo.com/webtree PHP 7.4.16
webtrees 2.0 dev on local WampServer PHP 7.4.9

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

The older version links that are shared with other websites do not work. 2 weeks 1 day ago #6

Did you activate the Legacy URLs module?


Sorry if I'm being dim, but can you point me to that? I haven't found it while searching.

The release notes for 2.0.4 say, "When you have pretty URLs enabled, webtrees will now recognise almost all URLs from webtrees 1.x...", and the FAQ says these should be handled automatically when you enable Pretty URLs.

Thanks,

Mark

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

The older version links that are shared with other websites do not work. 2 weeks 1 day ago #7

You will find the Legacy URLs module in Control panel -> All modules
webtrees 2.0.16 at visitusinmaputo.com/webtree PHP 7.4.16
webtrees 2.0 dev on local WampServer PHP 7.4.9

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

The older version links that are shared with other websites do not work. 2 weeks 1 day ago #8

You will find the Legacy URLs module in Control panel -> All modules


Thank you, found it there, and it is already enabled. I "turned it off and on again" since I didn't have any other ideas, but no change to the behavior.

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

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

The older version links that are shared with other websites do not work. 2 weeks 1 day ago #9

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14636
There is a problem with the URL.

The tree (ged) parameter contains spaces. These should be encoded as %20.

You have "double-encoded" the URL. In other words, you encode the special
characters (space becomes %20), and then encoded it again (% becomes %25).

Instead of this (which doesn't work)
https://www.hgrc-nm.org/webtrees/individual.php?pid=I166477&ged=Great%2520New%2520Mexico%2520Pedigree%2520Database

The URL should be this (which does work - and is redirected to the 2.0 URL).
https://www.hgrc-nm.org/webtrees/individual.php?pid=I166477&ged=Great%20New%20Mexico%20Pedigree%20Database
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

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

The older version links that are shared with other websites do not work. 2 weeks 1 day ago #10

There is a problem with the URL.

The tree (ged) parameter contains spaces. These should be encoded as %20.

You have "double-encoded" the URL. In other words, you encode the special
characters (space becomes %20), and then encoded it again (% becomes %25).

Instead of this (which doesn't work)
https://www.hgrc-nm.org/webtrees/individual.php?pid=I166477&ged=Great%2520New%2520Mexico%2520Pedigree%2520Database

The URL should be this (which does work - and is redirected to the 2.0 URL).
https://www.hgrc-nm.org/webtrees/individual.php?pid=I166477&ged=Great%20New%20Mexico%20Pedigree%20Database


Aha! Thank you for the clue. This led me to the answer.

The original legacy URL we're trying to use is valid and encoded correctly:
http://www.hgrc-nm.org/webtrees/individual.php?pid=I51149&ged=Great%20New%20Mexico%20Pedigree%20Database

After we access it and it says "not found", I copied the URL out of the location bar. That is where it got re-displayed with the bad encoding:
https://www.hgrc-nm.org/webtrees/individual.php?pid=I51149&ged=Great%2520New%2520Mexico%2520Pedigree%2520Database

I manually removed the "25"s from that URL:
https://www.hgrc-nm.org/webtrees/individual.php?pid=I51149&ged=Great%20New%20Mexico%20Pedigree%20Database

That URL works. But it's the same as the original right?

I finally saw the difference: http vs https. The web server has a rewrite rule on port 80 to send all HTTP traffic to HTTPS. I believe it's losing something in the rewrite, although I don't immediately see why.
RewriteCond %{REQUEST_URI} !^/.well-known/
RewriteRule (.*) https://www.hgrc-nm.org$1 [R=301,L]

Thank you very much for spotting that. I'll dig in to the rewrite to figure out how fix that.

Mark

P.S. So far I've confirmed that apache is inserting the 25's when it does the rewrite

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

Last edit: by abqcheeks.

The older version links that are shared with other websites do not work. 2 weeks 1 day ago #11

Thanks for all of your help.

The solution was to add NE to the apache RewriteRule flags, like so:
RewriteCond %{REQUEST_URI} !^/.well-known/
RewriteRule (.*) https://www.hgrc-nm.org$1 [R=301,NE,L]

Legacy URLs are working as expected now. Thank you!

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

  • Page:
  • 1
Powered by Kunena Forum