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 7082629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:04:40+00:00 2026-05-28T07:04:40+00:00

I am managing a few WordPress installations and I’m tired of the error logs

  • 0

I am managing a few WordPress installations and I’m tired of the error logs being full of 404 errors caused by bad bots that are constantly checking for style.css files in directories of known-hackable/exploitable themes, for example :

http://www.example.com/wp-content/themes/thestation/style.css

http://www.example.com/wp-content/themes/wootube/style.css

http://www.example.com/wp-content/themes/vibrantcms/style.css

There are a lot of different themes that the bad bots are searching for, so rather than write a rule for each one individually it would make more sense to have a redirectmatch that matches every instance of style.css so long as it’s NOT in the directory of the actual theme I’m using.

For example if I’m using the theme in the directory /twentyten/ then the RedirectMatch should catch every attempt to access any style.css file in any directory other than the /twentyten/ directory.

  • 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-05-28T07:04:41+00:00Added an answer on May 28, 2026 at 7:04 am

    AFAIK, you can’t do this with RedirectMatch, but if you want to enable mod_rewrite, then are you trying to do something like the following:

    <Directory .../wp-content/themes/>
        RewriteCond $1 !=twentyten
        RewriteRule ^(.*?)/style.css  badBotProbe/style.css [L]
        ...
    </Directory>
    

    (or some other flag such as [R=403]). The problem is whatever you do, the logs record the request parameter which will have these random styles, so you’d still need to do an intelligent filter.

    You could remove these probes from the error logs by this rule to redirect the query to the prober instead:

        RewriteRule ^(.*?)/style.css  http://{%REMOTE_ADDR}/tryyourself.css [R=301]
    

    but is this really what you want to do just to remove a 404 entry?

    PS. the above assumes you have access to the root config. The same solution with a tweak works in the appropriate .htaccess

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

Sidebar

Related Questions

I have a few related questions about managing aligned memory blocks. Cross-platform answers would
When managing shader's, does it make sense to have all of them compiled and
For managing some cache, I need a sort of Hashtable with the ability to
I use supervisord for managing tornado with no issuse wnhile using nginx as a
I am currently manually managing the lifecycle of objects in my project. I am
I'm working on managing access for users to some pages on my site. I
I'm managing an ASP 2.0 site that I didn't create running under IIS7. I
I'm managing a co-located winserver08 box running both IIS and SQL 08 express. I
I'm currently managing multiple models from a single SITE MANAGER page. I have the
The GUI for managing plugins in Eclipse got a bit of an overhaul in

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.