# ==================================================================================================== ============= RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^/?(.+\.html) /cgi-bin/counter.py?htmlpage=$1 [L,PT,QSA] # ==================================================================================================== ============= #### # ==================================================================================================== ============= # open current html template and get the page ID number # ==================================================================================================== ============= f = open( '/home/nikos/public_html/' + page ) # read first line of the file firstline = f.readline() # find the ID of the file and store it pin = re.match( r'', firstline ).group(1) # ==================================================================================================== =============