Jozefe: .htaccess mehrere variable

hallo,

ich habe ein php seite auf server hochgeladen wenn man die soo öffnet
/index.php?page=video&vid=769140&vkey=92bc1eb4df52294bd3f1a
dann funktioniert es aber ich habe ein rewriterule gemacht

RewriteRule ^videos/video.html?vid=([0-9]+)&vkey=([A-Za-z0-9]+)$  index.php?page=video&vid=$1&vkey=$2 [QSA]

und wenn ich die seite jetzt soo öffne

/videos/video.html?vid=769140&vkey=92bc1eb4df52294bd3f1a

funktioniert die nicht mehr.

Ich bedanke mich schon voraus fuer ihre hilfe.

Mit grússen Jozefe

  1. /index.php?page=video&vid=769140&vkey=92bc1eb4df52294bd3f1a

    RewriteRule ^videos/video.html?vid=([0-9]+)&vkey=([A-Za-z0-9]+)$  index.php?page=video&vid=$1&vkey=$2 [QSA]

    Das kann nichts werden, denn wie in der Anleitung groß und breit zu lesen:

    The Pattern will initially be matched against the part of the URL after the hostname and port, and before the query string. If you wish to match against the […] query string, use a RewriteCond with the […] %{QUERY_STRING} variable.

    Möchtest du also die URL-Parameter zu fassen kriegen, musst du RewriteCond mit %{QUERY_STRING} verwenden.

    1. /index.php?page=video&vid=769140&vkey=92bc1eb4df52294bd3f1a

      RewriteRule ^videos/video.html?vid=([0-9]+)&vkey=([A-Za-z0-9]+)$  index.php?page=video&vid=$1&vkey=$2 [QSA]

      Das kann nichts werden, denn wie in der Anleitung groß und breit zu lesen:

      The Pattern will initially be matched against the part of the URL after the hostname and port, and before the query string. If you wish to match against the […] query string, use a RewriteCond with the […] %{QUERY_STRING} variable.

      Möchtest du also die URL-Parameter zu fassen kriegen, musst du RewriteCond mit %{QUERY_STRING} verwenden.

      ich hab jetzt des hier ausprobiert aber funktioniert irgendwie nicht und ich komm nicht weiter

      RewriteCond %{QUERY_STRING} ^/videos/video.html?vid=[0-9a-f]&vkey=[0-9a-f]$ [NC]
      RewriteRule ^(.*)$ index.php?page=video&vid=$1&vkey=%2 [L,R=301]