0

古い W​​P を移行しましたが、新しい WP には異なる URL があります。この種の URL の「argentina-es」を取得しようとしています:

http://example.com/dev/category/places/america-latina/america-del-sur/argentina-es/page/9/

/dev/category/[places|other|another-one]/[get-this]/page/1

カテゴリの後に 6 つのオプションがあり、ページ/ID が常に存在するとは限りません。

私が望む最終的なURLはこれです:

http://example.com/dev/no-category/argentina-es

しようとしている:

RewriteCond %{REQUEST_URI} ^/dev/category(.*)
RewriteRule ^([places|other|another-one]*)/(.*)/page http://example.com/dev/no-category/$1 [R]
4

1 に答える 1

0

ドキュメント ルートの htaccess ファイルで:

RewriteRule ^dev/category/(places|other|another-one)/(.*?)/([^/]+)/(page/[0-9]+/?)?$ /dev/no-category/$3 [L,R]
于 2013-10-23T19:04:11.707 に答える