カレンダー コンポーネントを使用しなくなった Joomla サイトがあり、すべての古い URL をホームページにリダイレクトする必要があります。URLはこんな感じ…
http://www.example.com/week/?date=2006-03-05&print=1&tmpl=component
http://www.example.com/week/?date=2010-09-12
http://www.example.com/week/?date=2007-04-01&print=1&tmpl=component
ドメインの後のすべてを削除するために .htaccess ファイルに RedirectMatch を書き込もうとしましたが、URL から week/ しか削除できず、疑問符とパラメーターが残ります。これにより、テンプレートやモジュールを削除したり、印刷用にページをフォーマットしたりする特定のパラメーターに問題が生じます。
誰でも解決策を提案できますか? これが私がこれまでに試したことです...
RedirectMatch 301 ^/week/\?.* http://www.example.com
RedirectMatch 301 ^/week/\?(.*) http://www.example.com
RedirectMatch 301 ^/week/\?+.+ http://www.example.com
RedirectMatch 301 ^/week/\?+(.*) http://www.example.com
そして、開始キャレットなしの同じルール...
RedirectMatch 301 /week/\?.* http://www.example.com
RedirectMatch 301 /week/\?(.*) http://www.example.com
RedirectMatch 301 /week/\?+.+ http://www.example.com
RedirectMatch 301 /week/\?+(.*) http://www.example.com