I have a website that hacked some time ago. It is a WordPress. I have cleaned it up but in Google I keep seeing this links as shown below:
http://www.mysite.com/?p=-16
http://www.mysite.com/?month=-1034
http://www.mysite.com/?sdoc=billy+jean+sucks
I want to remove the pages p=a, month=X and sdoc=y through .htaccess. I just need some guidance.
I have done some reading and think that perhaps RewriteRule ^/page /page? may be applicable. The question mark seems placed differently from that of my site. So I'm wondering whether RewriteRule ^/page /?page may be what applies.
That said I want a solution that deletes them based on the wildcard string p, month and sdoc. How can I achieve that?
I am a n00b but if directed I can help myself. I have tampered with my .htaccess file in the past so I'm not afraid to make the changes.
Please explain like I'm a true idiot or dummy. Thanks and much appreciated.
RewriteRule ^/page /page?is the direction to go. My question is -- what do you want to do with URL that has more than one parameter, like/?p=-16&say=hello(wheresay=hellomay actually be used by your site). Or you want to drop whole query string if one of those parameters is present? Or maybe you want to drop the query if only that particular query string parameter is present? Sorry for asking -- but it is unclear for me.