我想将子目录/子页面/页面批量重定向到单个页面。
from
example.com/definicje
example.com/definicje/521/
example.com/definicje/592/a.html
etc.
to a single page
example.com/single-page/
我的重写规则实际上没有重定向任何内容:
# 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]
RewriteRule ^definicje(.*)$ http://example.com/single-page/ [R=301,L]
</IfModule>