Mir stellt sich folgendes Problem:
Ich habe eine index.py datei im ~/www/ verzeichnis die etwa so aussieht:
Code: Alles auswählen
def index(req):
return 'hallo index<img src="img/index.jpg">'
def other(req):
return 'hallo other<img src="img/other.jpg">'
Code: Alles auswählen
SetHandler mod_python
PythonHandler mod_python.publisher
* localhost/, localhost/index, localhost/index.py, localhost/index.py/index
ergibt: 'hallo index', das bild wird jedoch nicht angezeigt.
* localhost/other, localhost/index/other, localhost/index.py/other
ergibt: 'hallo other', das bild wird auch nicht angezeigt.
Konfiguriere ich Apache aber mit:
Code: Alles auswählen
AddHandler mod_python.py
PythonHandler mod_python.publisher
* localhost/, localhost/index.py
funktioniert einwandfrei (inklusieve bilder)
* localhost/index, localhost/me
ergibt: 404 not found
* localhost/index.py/other
ergibt: 'hallo other', jedoch immer noch ohne bilder
----------------------
Was muss ich tun damit ich die schönen Adressen von 'SetHandler' benutzen kann, aber auch schöne Bildchen habe?
Ach ja:
- Apache 2.0.54
- Python 2.4
- Ubuntu
dass wars dann auch schon.
Danke
gleez