0

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.

1
  • Yes, 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 (where say=hello may 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. Commented Aug 12, 2011 at 13:31

1 Answer 1

1

If you are programming in ASP.NET se these http://msdn.microsoft.com/en-us/library/ms972974.aspx

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.