MassBank / MassBank-web

The web server application and directly connected components for a MassBank web server
14 stars 22 forks source link

Broken google links to records #168

Closed Treutler closed 5 years ago

Treutler commented 5 years ago

Searching in google for 'MassBank rutin' results in the broken link (404) https://massbank.eu/MassBank/jsp/RecordDisplay.jsp?id=PR020080&dsn= which should be https://massbank.eu/MassBank/RecordDisplay.jsp?id=PR020080&dsn= or https://massbank.eu/MassBank/RecordDisplay.jsp?id=PR020080

We should think about a solution for this.

meier-rene commented 5 years ago

Haw can google find this pages if they are not static?

tsufz commented 5 years ago

Hüstel, there is no record representation on Google by now, just old broken links.... For any reason, the bot stops at the recordindex. I need urgently to fix the automated sitemap shell. Something to plug behind automated data update script.

sneumann commented 5 years ago

Is that script in the massbank-web repo ? If not Tobias would be the only person on the planet to fix. One can also add a redirect from .../jsp/... to just .../ , making sure it returns code "301 Moved Permanently" in the meantime.

meier-rene commented 5 years ago

I propose to create a dynamic sitemap.xml from the current online MassBank via a servlet. I will prepare that.

tsufz commented 5 years ago

We have the existing Sitemap.sh. The sitemap should also contain the main pages such as Index, Search, RecordIndex, Data Privavy, Imprint, depending on pages listet in the menu.jsp / html.

meier-rene commented 5 years ago

I have created an automatic sitemap servlet and designed some rewrite rules for apache which redirect the old jsp/Dispatcher.jsp URL to the new RecordDisplay.jsp:

***

RewriteEngine on RewriteRule ^/MassBank$ /MassBank/ [R] RewriteCond %{REQUEST_URI} ^/MassBank/jsp/Dispatcher.jsp$ RewriteCond %{QUERY_STRING} ^type=disp&(id=[0-9A-Z]+).$ RewriteRule (.) /MassBank/RecordDisplay.jsp?%1 [R=301,L,QSD] RewriteRule ^/MassBank/(.*) http://your_massbank_ip:8080/MassBank/$1 [L,P]