私はすでにいくつかのリダイレクトを正常に行った.htaccessファイルで作業しています.私が問題を抱えている行は次のとおりです:
RedirectMatch 301 ^bookfox/(.*)/(.*)/(.*) http://www.thejohnfox.com/$3
この URL を取得しようとしています:http://thejohnfox.com/bookfox/2006/10/joyce_carol_oat
に転送します。http://thejohnfox.com/joyce_carol_oat
これを行うには RedirectMatch しか取得できませhttp://thejohnfox.comjoyce_carol_oat
ん。見つけることができるすべてを試しましたが、何も機能しません。
の後にスラッシュが取り出されている理由を知っている人はいthejohnfox.com
ますか?
私のWordpress .htaccessファイルからの完全なコードは次のとおりです。
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Redirect 301 /bookfox/bio.html http://thejohnfox.com/bio/
Redirect 301 /bookfox/journals-accepting-novellas.html http://thejohnfox.com/journals-accepting-novellas/
Redirect 301 /bookfox/ranking-of-literary-journ.html http://thejohnfox.com/ranking-of-literary-journals/
Redirect 301 /bookfox/what-is-bookfox.html http://thejohnfox.com/what-is-bookfox/
Redirect 301 /bookfox/journals-accepting-electronic-submissions.html http://thejohnfox.com/journals-accepting-electronic-submissions/
RedirectMatch 301 ^(.*)\.html$ http://thejohnfox.com$1/
RedirectMatch 301 ^bookfox/(.*)/(.*)/(.*) http://www.thejohnfox.com/$3
</IfModule>
# END WordPress