这与我的其他问题Spam and Old URLs Modification和Fake URLs created automatically的关系。有人会告诉我为什么要创建它们吗?我想重定向下面的网址。我想从我的域名中删除多余的字符串或垃圾邮件。我更喜欢.htaccess。我正在使用wordpress。
deemasfashion.com/ **cgi-sys/defaultwebpage.cgi**
deemasfashion.com/ page/38/wpmp_switcher
deemasfashion.com/ ?2fou_com
deemasfashion.com/ **?iapolo_com**
deemasfashion.com/ ?dur=2016
deemasfashion.com/ **?dur=375**
deemasfashion.com/ ?file
deemasfashion.com/ ?option=com_content&view=frontpage&itemid=1
deemasfashion.com/ ?option=com_content&view=category&id=34:latest-tech- news&itemid=60
deemasfashion.com/ ?www.web3389.com
deemasfashion.com/ ?wpmp_switcher=desktop
deemasfashion.com/ ?option=com_content&view=category&id=34%3Alatest-tech-news&Itemid=60
我在 Document_root 代码中的 .htaccess 代码如下。
<IfModule mod_rewrite.c>
RewriteEngine On
# code by anubhava
RewriteCond %{QUERY_STRING} ^.+$
RewriteRule ^(page/[0-9]+/?).*$ /$1? [L,NC,R=301]
# Remove Edit Post
# RewriteCond %{QUERY_STRING} (?:^|&)post=([^&]+) [NC]
# RewriteRule ^wp-admin/post\.php$ /?p=%1 [L,NC,R=301]
# function.session-start not working
# RewriteRule ^(latest-pakistani-anarkali-pishwas-frock-wear/[^/]+/?).+$ /$1? [L,NC,R=301]
# code by anubhava
# BEGIN WordPress
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]
# END WordPress
</IfModule>