Προς το περιεχόμενο

Πως να στειλω μεσε mod_rewrite του επισκεπτη τα variables and values with mod_rewrite


Nik0s

Προτεινόμενες αναρτήσεις

Δημοσ.

Χρησιμποιω ττο ακολουθο mod_rewrite rule:

 


RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^/?(.+\.html) /cgi-bin/index.py?page=$1= [L,PT]
[/Code]

 

to address a visitors url request to my webpage like that => http://webville.gr/index.html

 

Now due to changes to my cgi python script i have to address something like the following:

 

http://webville.gr/index.html?variable=value

 

and for that reason i tried the following rule

 

[Code]
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^/?(.+\.html)(\?(.*))? /cgi-bin/index.py?page=$1&$3 [L,PT,NE]
[/Code]

 

but unfortunately it doesnt work and i knwo it because when from within the python script i try to:

 

if form.getvalue('show') == 'log'

 

or

 

if form.getvalue('show') == 'stats'

 

the code block isnide the if() statemnt never get executed which lead me to beleive that the rule apart form the webpage ain't sending any more variables.

 

Παρακαλω τα φωτα σας.

__________________

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...