これは、自動的に作成される偽の URLを参照したものです。これは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/
私はワードプレスを使用しています。私のパーマリンクは /%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>