这是参考自动创建的假网址。这已由https://stackoverflow.com/users/548225/anubhava
解决。错误或垃圾邮件创建了太多的 URL,如下所示,但现在我想将它们重定向到各自的帖子页面 URL。
我更喜欢.htaccess。请帮忙
abc.com/wp-admin/post.php?post=4051&action=edit
**Redirect to**
abc.com/?p=4051
和
abc.com/page/56/?option=com_content&view=article&id=94&Itemid=2
**Redirect to**
abc.com/page/56/
和
abc.com/category5/post-about-fashion/function.include
**Redirect to**
abc.com/category5/post-about-fashion/
我正在使用wordpress。我的固定链接是/%category%/%postname%/。我的htaccess代码如下...
<IfModule mod_rewrite.c>
RewriteEngine On
# code by anubhava
RewriteCond %{QUERY_STRING} ^.+$
RewriteRule ^(page/[0-9]+/).*$ /$1? [L,NC,R=301]
# code by anubhava
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTP_HOST} ^www\.deemasfashion\.com$
RewriteRule ^deemasfashion\.com/?(.*)$ http://deemasfashion.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://deemasfashion.com/ [R=301,L]
RewriteRule ^index\.htm$ http://deemasfashion.com/ [R=301,L]
</IfModule>