Giter Club home page Giter Club logo

Comments (5)

prototypo avatar prototypo commented on August 23, 2024

Hi Nandana,

Yes, I don’t see any reason this wouldn’t work unless the Apache wasn’t compiled with RewriteCond support. Try it :)

Regards,

Dave

http://about.me/david_wood

On Feb 24, 2015, at 12:15, Nandana Mihindukulasooriya [email protected] wrote:

I wanted to ask whether w3id supports/permits to do URL rewriting with conditions for content negotiation, for instance using RewriteCond http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond.

My usecase is to host my ontology in Github pages and use w3id URL as a permanent identifier. Further, I want to have content negotiation on that URL but unfortunately Github pages doesn't support content negotiation. However, if I can do this at the URL rewrite stage I can still properly do what I wanted to do.

For example, something like the following.

RewriteCond %{HTTP:Accept} text/turtle
RewriteRule ^foo$ http://proj.github.io/vocab/foo.ttl http://proj.github.io/vocab/foo.ttl [R=303,L]

RewriteCond %{HTTP:Accept} application/rdf+xml
RewriteRule ^foo$ http://proj.github.io/vocab/foo.xml http://proj.github.io/vocab/foo.xml [R=303,L]

RewriteRule ^foo$ http://proj.github.io/vocab/foo.html http://proj.github.io/vocab/foo.html [R=303,L]

P.S. I am not an expert on HTTPD config, so there may be a better way to do this.


Reply to this email directly or view it on GitHub #65.

from w3id.org.

davidlehn avatar davidlehn commented on August 23, 2024

Your best bet is to set up a local server to test out configs. Another project has some content negotiation support that might be useful though I've never tried it. If you do come up with a good solution let us know and maybe we can start some docs.

https://github.com/perma-id/w3id.org/blob/master/isa/.htaccess

from w3id.org.

 avatar commented on August 23, 2024

Hi David,

On Feb 24, 2015, at 13:00, David I. Lehn [email protected] wrote:

Your best bet is to set up a local server to test out configs. Another project has some content negotiation support that might be useful though I've never tried it. If you do come up with a good solution let us know and maybe we can start some docs.

That wouldn’t answer the question of whether RewriteCond support is compiled into the w3id.org http://w3id.org/ Apache.

Regards,

Dave

http://about.me/david_wood

from w3id.org.

davidlehn avatar davidlehn commented on August 23, 2024

mod_rewrite is enabled, it's used by almost every .htaccess file on the site. If there is something missing that's needed, we can enable it.

from w3id.org.

nandana avatar nandana commented on August 23, 2024

Thanks a lot Dave and David!
I will do a pull request to try it out.

from w3id.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.