Bonjour Mac,
Merci d'avoir pris le temps de répondre.
Prenons les problèmes dans l'ordre. J'espère être assez clair, parce que c'est jamais facile d'expliquer un problème.
J'ai écris une seule ligne de code
RewriteRule ^/(.*)$ http://monserveur.ch:10080/$1 [L,P]
1.
Quand je tape http://mondomaine.ch/PageMaster/, il me redirige correctement
Si je regarde le log, je suis redirigé vers /Troy/getFile. Bizzare, mais j'obtiens le bon résultat. Je pense qu'il y a double redirection, mais ça fonctionne
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| 172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7adf578/initial] (2) init rewrite engine with requested uri /PageMaster/
172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae95a0/initial] (3) applying pattern '^/(.*)$' to uri '/PageMaster/AC_OETags.js'
172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae1580/initial] (2) forcing proxy-throughput with http://172.24.20.51:10080/PageM
aster/portal.swf
172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae1580/initial] (1) go-ahead with proxy request proxy:http://172.24.20.51:10080/P
ageMaster/portal.swf [OK]
172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae5590/initial] (2) init rewrite engine with requested uri /PageMaster/blank.html
172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae5590/initial] (3) applying pattern '^/(.*)$' to uri '/PageMaster/blank.html'
172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae5590/initial] (2) rewrite '/PageMaster/blank.html' -> 'http://172.24.20.51:1008
0/PageMaster/blank.html'
172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae5590/initial] (2) forcing proxy-throughput with http://172.24.20.51:10080/PageM
aster/blank.html
172.24.20.5 - - [14/Oct/2010:09:44:02 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae5590/initial] (1) go-ahead with proxy request proxy:http://172.24.20.51:10080/P
ageMaster/blank.html [OK]
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae95a0/initial] (2) init rewrite engine with requested uri /PageMaster/PortalReso
urceModule_fr.swf
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae95a0/initial] (3) applying pattern '^/(.*)$' to uri '/PageMaster/PortalResource
Module_fr.swf'
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae95a0/initial] (2) rewrite '/PageMaster/PortalResourceModule_fr.swf' -> 'http://
172.24.20.51:10080/PageMaster/PortalResourceModule_fr.swf'
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae95a0/initial] (2) forcing proxy-throughput with http://172.24.20.51:10080/PageM
aster/PortalResourceModule_fr.swf
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7ae95a0/initial] (1) go-ahead with proxy request proxy:http://172.24.20.51:10080/P
ageMaster/PortalResourceModule_fr.swf [OK]
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7aed5b0/initial] (2) init rewrite engine with requested uri /PageMaster/javascript
/ColorTuneDisplay.js
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7aed5b0/initial] (3) applying pattern '^/(.*)$' to uri '/PageMaster/javascript/Col
orTuneDisplay.js'
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7aed5b0/initial] (2) rewrite '/PageMaster/javascript/ColorTuneDisplay.js' -> 'http
://172.24.20.51:10080/PageMaster/javascript/ColorTuneDisplay.js'
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7aed5b0/initial] (2) forcing proxy-throughput with http://172.24.20.51:10080/PageM
aster/javascript/ColorTuneDisplay.js
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7aed5b0/initial] (1) go-ahead with proxy request proxy:http://172.24.20.51:10080/P
ageMaster/javascript/ColorTuneDisplay.js [OK]
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7adf578/initial] (2) init rewrite engine with requested uri /Troy/getFile
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7adf578/initial] (3) applying pattern '^/(.*)$' to uri '/Troy/getFile'
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7adf578/initial] (2) rewrite '/Troy/getFile' -> 'http://172.24.20.51:10080/Troy/ge
tFile'
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7adf578/initial] (2) forcing proxy-throughput with http://172.24.20.51:10080/Troy/
getFile
172.24.20.5 - - [14/Oct/2010:09:44:03 +0200] [portal.st-paul.ch/sid#b793f6d0][rid#b7adf578/initial] (1) go-ahead with proxy request proxy:http://172.24.20.51:10080/T
roy/getFile [OK] |
2.
Maintenant, le même URL mais sans le "/" après PageMaster
Quand je tape http://mondomaine.ch/PageMaster, il me redirige à la bonne place, mais ne trouve pas la page (le fameux /Troy/getFile). Comment faire pour qu'il ajoute un "/" et me redirige vers la bonne page ?
1 2 3 4 5 6 7 8
| 172.24.20.5 - - [14/Oct/2010:09:30:09 +0200] [portal.st-paul.ch/sid#b79e46d0][rid#b7b84580/initial] (2) init rewrite engine with requested uri /PageMaster
172.24.20.5 - - [14/Oct/2010:09:30:09 +0200] [portal.st-paul.ch/sid#b79e46d0][rid#b7b84580/initial] (3) applying pattern '^/(.*)$' to uri '/PageMaster'
172.24.20.5 - - [14/Oct/2010:09:30:09 +0200] [portal.st-paul.ch/sid#b79e46d0][rid#b7b84580/initial] (2) rewrite '/PageMaster' -> 'http://172.24.20.51:10080/PageMaste
r'
172.24.20.5 - - [14/Oct/2010:09:30:09 +0200] [portal.st-paul.ch/sid#b79e46d0][rid#b7b84580/initial] (2) forcing proxy-throughput with http://172.24.20.51:10080/PageM
aster
172.24.20.5 - - [14/Oct/2010:09:30:09 +0200] [portal.st-paul.ch/sid#b79e46d0][rid#b7b84580/initial] (1) go-ahead with proxy request proxy:http://172.24.20.51:10080/P
ageMaster [OK]] |
3.
Toujours dans la même idée que ci-dessus, quand je tape http://mondomaine.ch, je voudrais aussi qu'il me renvoie vers ce fameux /Troy/getFile, mais cette fois, il démarre une autre page qui me renvoie vers ...start.do. Est-il possible de réécrire l'URL avec /PageMaster/, pour qu'il me renvoie vers /Troy/getFile ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| 172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b79fb580/initial] (2) init rewrite engine with requested uri /
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b79fb580/initial] (3) applying pattern '^/(.*)$' to uri '/'
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b79fb580/initial] (2) rewrite '/' -> 'http://172.24.20.51:10080/'
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b79fb580/initial] (2) forcing proxy-throughput with http://172.24.20.51:10080/
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b79fb580/initial] (1) go-ahead with proxy request proxy:http://172.24.20.51:10080/
[OK]
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b7a01598/initial] (2) init rewrite engine with requested uri /scripts/3.0/applicati
on.js
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b7a01598/initial] (3) applying pattern '^/(.*)$' to uri '/scripts/3.0/application.j
s'
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b7a01598/initial] (2) rewrite '/scripts/3.0/application.js' -> 'http://172.24.20.51
:10080/scripts/3.0/application.js'
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b7a01598/initial] (2) forcing proxy-throughput with http://172.24.20.51:10080/scrip
ts/3.0/application.js
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b7a01598/initial] (1) go-ahead with proxy request proxy:http://172.24.20.51:10080/s
cripts/3.0/application.js [OK]
172.24.20.5 - - [14/Oct/2010:09:36:21 +0200] [portal.st-paul.ch/sid#b785b6d0][rid#b79fd588/initial] (2) init rewrite engine with requested uri /start.do |
Partager