0

私はこのURLを持っています:

http://www.example.com/prospective/deginfo.php?classname=PE&diploma_description=BSc+in+Mathematical+Sciences

代わりに、次の URL にリダイレクトする必要があります。

http://www.example.ie/prospective/deginfo.php?classname=PEC&diploma_description=BSc+in+Mathematical+Sciences+with+French+%27Bachelor+Honours+Degree%27

RedirectMatchそこまでのすべてを「キャッチ」して、必要なBscURLにリダイレクトするために次のことができると思いましたが、機能していません:

RedirectMatch ^/.*BSc\+in\+Physical\+Education http://www.example.ie/prospective/deginfo.php?classname=PEC&degree_description=BSc+in+Mathematical+Sciences+with+French+%27Bachelor+Honours+Degree%27

誰かが私が間違っていることと修正する方法を教えてもらえますか?

4

1 に答える 1

2

のクエリ文字列と照合することはできません。URIRedirectMatchとのみ照合します。mod_rewrite と a を使用して、それに対して一致させることができますRewriteCond:

RewriteEngine On

RewriteCond %{QUERY_STRING} ^classname=PE&diploma_description=BSc\+in\+Mathematical\+Sciences$
RewriteRule ^/?prospective/deginfo.php$ /prospective/deginfo.php?classname=PEC&degree_description=BSc+in+Mathematical+Sciences+with+French+'Bachelor+Honours+Degree' [L,R]
于 2012-07-13T08:16:41.823 に答える