Forum

what is /p/ in a url ?

push
22 December 2012, 09:09
new user question :

as url example : http://code.google.com/p/blabla_project

the "/p/" in the url seems not to be an existing directory on harddisk,
but looks like a parameter in the url, isn't it ?
is that a behavior to configure in the web-server ?

Hiawatha version: 8.6
Operating System: Lubuntu
Hugo Leisink
22 December 2012, 10:16
Yes, it's the same as with this website. I don't have a directory called forum/topic/1271, but still you got a webpage in your browser. This is called 'URL rewriting'. In this website, all requests for non existing files are rewritten to /index.php, which looks at what the original URL was and handles the request based on that original request.
push
22 December 2012, 20:29
oh, I see ... this is a reason of "UrlToolkit" implementation in Hiawatha.

It is perhaps the place to explain some goals I have :

Haxe/neko ( nekovm.org or haxe.org ) is the ( new and secured ) web programming language I use since year 2008; but the ( little ) client-server applications were developed on my desktop-PC ( with "nekotools server" which works by default on "localhost:2000" ) and never deployed in a real web-environment as Hiawatha works with ... by default.

- second goal : you perhaps know the code written in Haxe/neko can be directly compiled ... in PHP; so the fastest way to test under Hiawatha the "neko-server-applications.hx" I wrote since 2008, would be to compile the code ( without any change ) ... in PHP-target ( commandline : "haxe -main MyServercode.hx -php dirname --remap neko:php" ); and then deploy the generated php-code under "WebsiteRoot" to run it in php-fastcgi mode under Hiawatha web-server.

- third goal : natively, Haxe-compiler compiles the "MyServercode.hx" in one "index.n" bytecode-file ( commandline : "haxe -main MyServercode.hx -neko index.n" ) which the Neko-virtual-machine can run on the server ( like a "php-interpreter.exe" parses and runs "server-code.php" ). Under Hiawatha, are there ways to do that ? after reading your response, I searched "URL" on the "hiawatha-webserver.org/manpages" and asked me : could "ReverseProxy" be a response by redirecting some Hiawatha-requests made on "localhost:80" to "localhost:2000" ( local neko-web-server would then directly "print" the requested file to the client-Browser ) ?

( deploying applications on the web is a complete new stake; so the first goal is certainly learn how to configure a web-server; Hiawatha seems to be a good choice for me )

thanks ... and Merry Christmas to you too.

Michel
This topic has been closed.