Q:

How to get raw unwritten querystring

Without permalink enabled, the urls look like ?p=1 and when permalink is activated it's the postname that appears... question .. isn't this a rewritten version of ?p=1 .. 
When I use $_GET['p'], there is nothing in there... is that normal?

A:

$_GET refers literally to ?p=1 part of URL. With pretty permalink if it's empty then there is nothing to access.
WordPress processed either case into query variables of WP_Query class. You should use get_query_var() to retrieve things like this, so in this specific case it would probably be get_query_var( 'p' ).

