Search code examples
phpapacheurlsoapurn

How to configure URN


I like to learn about below URL.

https://server_ip/testing/urn:id:value

I have understand from "https://server_ip/testing/" contains the protocol HTTPS and server ip and path.

I want to know the remaining part of the url "urn:id:value". How the URL is working without file name and extension. Whats need to do in server side to provide this type of URL.

I'm using appache V2.4.12 and php V5.5.10.

I got some knowledge from stackoverflow to create the URL without file extension.

https://server_ip/testing/sample_code.php

to

https://server_ip/testing/sample_code

thanks in advance


Solution

  • The path component is not /testing/, but /testing/urn:id:value.

    While the path segment urn:id:value looks like a URN, it isn’t one in this context. It’s a HTTPS URL that probably gives some information about the URN, similar to a HTTPS URL like

    https://example.com/page-check/http://stackoverflow.com/
    

    which might give information about the HTTP URL http://stackoverflow.com/ (the path is /page-check/http://stackoverflow.com/).

    But it’s only for usability reasons that it’s contained in the path like that. The URL could as well be something like

    https://example.com/page-check?protocol=https&domain=stackoverflow.com&path=/
    

    or

    https://example.com/page-check/f623Dn1