How to remove the "?" character from g-wan URIs

189 views Asked by At

I have checked cache.c <- totally clueless what it is doing or how to have pretty permalinks to servlet calls.

Update: OK, I know what the above does, but the problem is you have to call the above script first before you can access it as permalink. Is there any way I can access permalinks without using "?" at all (in the first place)?

I have also checked on this link: Anatomy of G-WAN URI servlets

I would like to have http://example.com:8080/servlet/arg1/arg2, without "?", and would like the above link to reference "servlet" to servlet.c.

Basically, like this pretty URL for this question

https://stackoverflow.com/questions/27084626/how-to-remove-in-g-wan-url-completely

See...no "?" within the URL.

Is this possible?

I have also checked

u8 *query_char = (u8*)get_env(argv, QUERY_CHAR);
*query_char = '!'; // use "/!hello.c" instead of "/?hello.c" 

I know I can't do

*query_char = '';
1

There are 1 answers

0
fatihky On BEST ANSWER

you can re-write url with handler there is a simple rewrite example