Category Archives: arguments

How can I call a python function that takes arguments from html?

At my internship I have the job to program a web-interface for an e-mail server that runs apache.

The script needs to be able to browse to a specified path (i need argument passing for that), search the files in the folder for a string and list the folders content.

So, how can i pass arguments from an html webpage to my python script and call the corrosponding function?

For example, i have a textfield and onclick of the "Navigate" button i take the input of the field and call the navigate_to(path) method in my python script.

I dove into cgi, but that couldnt help me and the resources i find online are slim and way above my reach (programming custom tags in django?).

Is there a way to do that, and if not with python - what is the other best way to get to the result?

htaccess getting additional php arguments [duplicate]

This question already has an answer here:

My .htaccess code

RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?key=$1

My index.php code given below


$key=isset($_GET['key']) ? $_GET['key'] : 'home';
if( in_array( $key, array('home','about','terms') ) ){

When is using "http://localhost/project_dir/home" is working correctly(home is assigned to argument '?key'). but i want to pass extra arguments like "http://localhost/project_dir/home?a=abc123"

How can i get argument "a"($_GET['a'] ) ?