何らかの理由で、1 つの magento URL が私の Web サイトで正常に機能していません。こちらを参照してください: 整合性制約違反: 1052 列 'position' in order 句があいまいです
だから、私はこの失敗した URL のリダイレクトを行うことができると決めました: Apache で試しましたが、うまくいきません ここを参照してください: Apache simple redirect from one page to a second one
彼らはphpでそれを行うことを提案しました
誰かがphpでこれを行う方法を説明してもらえますか?
何かのようなもの
if url = 'myfaliingurl' then
redirect to new url
それでおしまい
これは私がApacheで試したものです
Redirect 301 http://www.theprinterdepo.com/catalogsearch/result/index/?cat=100&q=1022&x=0&y=0 http://www.theprinterdepo.com/catalogsearch/advanced/result/?name=1022&sku=&price%5Bfrom%5D=&price%5Bto%5D=&free_shipping=&category=100
更新 1:
うまくいかないので、これを最後に index.php に置きます。
if($url == 'http://www.theprinterdepo.com/catalogsearch/result/index/?cat=100&q=1022&x=0&y=0')
{
header('location:http://www.theprinterdepo.com/catalogsearch/result/index/?cat=100&q=1022&x=0&y=0 http://www.theprinterdepo.com/catalogsearch/advanced/result/?name=1022&sku=&price%5Bfrom%5D=&price%5Bto%5D=&free_shipping=&category=100');
exit();
}
else
{
Mage::run('printerdepo','website');
}