Git Product home page Git Product logo

disable-search-slug's Introduction

Disable Search Slug

Stops /search/... URLs from working, resulting in a WordPress 404 page not found.

Description

If bots are attacking your site by appending /search/a-random-string-or-word, then those pages may be getting indexed by search engines, or populating search logs.

This plugin disables that permalink structure.

Search forms will still work, and the search results page will use the less index-friendly ?s=search-term format.

Installation

Upload

  1. Download the latest tagged archive (choose the "zip" option).
  • Go to the Plugins โ†’ Add New screen and click the Upload tab.
  • Upload the zipped archive directly.
  • Go to the Plugins screen and click Activate.

Manual

  1. Download the latest tagged archive (choose the "zip" option).
  • Unzip the archive.
  • Copy the folder to your /wp-content/plugins/ directory.
  • Go to the Plugins screen and click Activate.

Check out the Codex for more information about installing plugins manually.

Git

In a terminal, browse to your /wp-content/plugins/ directory and clone this repository:

git clone [email protected]:GaryJones/disable-search-slug.git

Then go to your Plugins screen and click Activate.

Updates

This plugin supports the GitHub Updater plugin, so if you install that, this plugin becomes automatically updateable direct from GitHub.

Change Log

Please see CHANGELOG.md.

Credits

Built by Gary Jones
Copyright 2016 Gamajo Tech

disable-search-slug's People

Contributors

garyjones avatar

Watchers

 avatar James Cloos avatar

disable-search-slug's Issues

Flushed permalinks ignore this plugin.

  1. Activate plugin.
  2. Check /search/test - correctly comes up with 404 page.
  3. Visit Settings -> Permalinks (or flush the rewrite rules another way).
  4. Check /search/test -> no longer a 404 page, but a search results page (with or without results).

The filtering of the rewrite rules in this plugin, is linked to when the plugin is activated - it does not account for all the other times the rewrite rules are flushed. Big fail.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.