我想删除年份和月份,并从Google搜索中重定向旧帖子
这是我的htaccess代码
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^m=1$
RewriteRule ^(.*)$ /$1? [R=301,L]
Options -MultiViews
RedirectMatch 301 ^/[0-9]{4}/[0-9]{2}/([a-z0-9\-/]+) https://newkannada.com/$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/.]+)/?$ $1.html [L,R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
但它也将.html附加到类别
提前感谢任何帮助