- From: David I. Lehn <dil@lehn.org>
- Date: Thu, 7 Aug 2025 23:13:11 -0400
- To: Angus Leslie Nixon <angus.nixon@adelaide.edu.au>
- Cc: "public-perma-id@w3.org" <public-perma-id@w3.org>
- Message-ID: <CADcbRRNAtg9O2mRV0JBtKrGnVwDHGE7WcU_bizGJt68p5OSq8A@mail.gmail.com>
I'll follow up in the latest PR: https://github.com/perma-id/w3id.org/pull/5207 The general idea is that the rules will be processed in order and the first match wins. So if you have multiple paths you want to match, you would put path prefixes in the patterns. It depends on your use case how to best set things up. If you want a fallback default, that would go last. You're also sending the URL through as a query param. Quoting can get tricky with that. -dave On Thu, Aug 7, 2025 at 10:14 PM Angus Leslie Nixon < angus.nixon@adelaide.edu.au> wrote: > Hi Dave > > > > I have a number of vocabularies at different web locations I would like to > redirect to, but adding multiple RewriteRules appears to only follow the > first rule. > > > > Currently working is the redirect to the URL: > https://vocabs.ardc.edu.au/repository/api/lda/agn/agn-geochemistry-vocabulary/v1-0/resource?uri=https%3A%2F%2Fw3id.org%2Fauscope-geochemistry-network%2Fgeochemistry%2F1.0%2Fanalyte > which has a URI: > *https://w3id.org/auscope-geochemistry-network/geochemistry/1.0/analyte* > <https://w3id.org/auscope-geochemistry-network/geochemistry/1.0/analyte> > > (vocabulary at https://vocabs.ardc.edu.au/viewById/689) > > > > I have tried to add another redirect for another vocabulary, with an > example landing page at URL: > https://demo.vocabs.ardc.edu.au/repository/api/lda/agn/agn-analysis-scale-test/v1-0/resource?uri=https%3A%2F%2Fw3id.org%2Fauscope-geochemistry-network%2Fgeochemistry%2Fanalysis-scale > and would have the URI: > *https://w3id.org/auscope-geochemistry-network/geochemistry/analysis-scale* > <https://w3id.org/auscope-geochemistry-network/geochemistry/analysis-scale>, > but this seems to try to direct to the first URL path: > > 404 Resource Not Found: > https://vocabs.ardc.edu.au/repository/api/lda/agn/agn-geochemistry-vocabulary/v1-0/resource?uri=https://w3id.org/auscope-geochemistry-network/geochemistry%2fanalysis%2dscale > > (vocabulary at https://demo.vocabs.ardc.edu.au/viewById/1142) > > > > .htaccess file is at > https://github.com/perma-id/w3id.org/blob/master/auscope-geochemistry-network/.htaccess > > > > Perhaps I need to specify the Patterns for each? I hope this is clearer > now. > > > > Regards, > > Angus > > > > *From:* David I. Lehn <dil@lehn.org> > *Sent:* Friday, 8 August 2025 4:39 AM > *To:* Angus Leslie Nixon <angus.nixon@adelaide.edu.au> > *Cc:* public-perma-id@w3.org > *Subject:* Re: w3id for multiple vocabularies > > > > *CAUTION: External email. Only click on links or open attachments from > trusted senders.* > > > ------------------------------ > > I'm not clear on what the request is for. Can you post what a couple of > w3id URLs should look like and what they would map to? > > > -dave > > > > > > On Tue, Aug 5, 2025 at 9:24 PM Angus Leslie Nixon < > angus.nixon@adelaide.edu.au> wrote: > > Hello > > > > I have previously used w3id to direct to landing pages for a single > vocabulary under a common web address using the following in the .htaccess > file > > > > RewriteEngine On > > RewriteRule ^(.*)$ > https://vocabs.ardc.edu.au/repository/api/lda/agn/agn-geochemistry-vocabulary/v1-0/resource?uri=https://w3id.org/auscope-geochemistry-network/$1 > [B,L,NE,QSA,R=307] > > > > Am I able to use this same .htaccess file to direct landing pages for > multiple vocabularies at multiple different web addresses? So far I haven’t > been able to figure this out using a single .htaccess file. > > > > The web addresses to add follow a common format, with the initial > directory pointing to the web service (in this case through Australian > Research Data Commons), followed by the vocabulary directory and address of > the individual concepts and landing pages.: > > > > https://vocabs.ardc..edu.au/repository/api/lda/agn/ > *[vocabulary-name-and-info]*/*[individual-concept-address]* > > > > Have included some examples if this is of use: > > https://.vocabs.ardc.edu.au/repository/api/lda/agn/ > *agn-analysis-scale-test/v1-0/*resource?uri= > https%3A%2F%2Fw3id.org%2Fauscope-geochemistry-network%2Fgeochemistry%2Fanalysis-scale > > https://.vocabs.ardc.edu.au/repository/api/lda/agn/ > *agn-data-reduction-software-test/v1-0/*resource?uri= > https%3A%2F%2Fw3id.org%2Fauscope-geochemistry-network%2Fgeochemistry%2Fdata-reduction-software%2Fargon-argon-thermochronology > > > > Thanks for any help! > > > > Regards, > > Angus Nixon > >
Received on Friday, 8 August 2025 03:13:27 UTC