1

Web サイトの 1 つでリダイレクトの重大性に直面しました。はい、これ -

http://local.port-all/antique/c-Furniture/m-Antique-Dining-Room-Tables.htmlhttp: //local.port-all/antique-c-Furniture-m-にリダイレクトする必要があります。アンティーク+ダイニング+部屋+テーブル.html

だから私はhtaccessリダイレクトを書いた

    Redirect /antique/c-Furniture/m-Antique-Dining-Room-Tables.html /antique-c-Furniture-m-Antique+Dining+Room+Tables.html

したがって、特定の URL にリダイレクトされます。ただし、サイトにはデフォルトのルール セットがあり、

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
    RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

したがって、リダイレクトが機能すると、リダイレクトされた URL の末尾にルートが追加されます。つまり、リダイレクト後に表示されます

    http://local.port-all/antique-c-Furniture-m-Antique+Dining+Room+Tables.html?_route_=antique/c-Furniture/m-Antique-Dining-Room-Tables.html

しかし、私はただ必要です

    http://local.port-all/antique-c-Furniture-m-Antique+Dining+Room+Tables.html

取得できなかったリダイレクト後。削除できません

    _route_ from RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] 

サイトのデフォルト ルート アクセスを作成したためです。だから私は別の解決策が必要です。

助けてください。

前もって感謝します

4

0 に答える 0