Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8895085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:40:49+00:00 2026-06-14T23:40:49+00:00

Despite searching extensively I cannot seem to find an answer, so I apologise if

  • 0

Despite searching extensively I cannot seem to find an answer, so I apologise if this has been asked before and I’ve simply missed it.

I have a site with only static URIs, all SEO friendly, hard-coded in the .htaccess file. Unfortunately we’re seeing a lot of other sites linking to us with query strings searching for unsavoury things. This is hurting our search ranking and we’d like to return a 404 for anything with a query string.

I’ve tried variations on the following, without success:

RewriteCond %{QUERY_STRING} .
RewriteRule ^404.php/? [R,L]

Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:40:50+00:00Added an answer on June 14, 2026 at 11:40 pm
    RewriteEngine on
    RewriteCond %{QUERY_STRING} .
    RewriteRule (.*) /404.php? [R,L]
    

    This should achieve what you are trying to do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't seem to find out how to do this in .NET2.0 despite searching
Despite a good deal of searching here I haven't been able to find the
Despite searching the plugin docs and general searching, I can't find an answer to
Despite searching all over the place, I can't find the answer to my question.
I realize this is an easy question, but despite searching I can't find anything
Despite my searching I can't seem to get good information. I just need to
I've been searching online to find ways of incorporating paypal into flash after discovering
Fairly straightforward scenario, for which I can't seem to find an answer anywhere :
Despite my many efforts to learn RegEx, I find this quite hard todo, so
I suppose the solution is simple, but I haven't found an answer despite searching

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.