Title: Command Line Parameter ignored
Last modified: July 1, 2026

---

# Command Line Parameter ignored

 *  [Merlin Silk](https://wordpress.org/support/users/merlinsilk/)
 * (@merlinsilk)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/command-line-parameter-ignored/)
 * Hi,
 * I had a nasty break-in but all is restored now. What is left are links known 
   to Google Search Console of the form example.com/?y=123456 that I want to return
   with a 404 so that Google will eventually forget about them.
 * But whatever I do, any command line parameter that I add to my sites URL, ends
   on my sites page, ignoring this parameter.
 * I tried
 * RewriteEngine On
   RewriteCond %{QUERY_STRING} ^[a-zA-Z]=[0-9]+$RewriteRule ^ –[
   R=404]
 * to force a 404 on parameters like y=123456, but it does not have any effect.
 * I believe, this .htaccess setting is processed, because if I replace [0-9] with
   a single period to make the value of the parameter a string of any characters,
   a few pages in the the backend settings pages are mangled.
 * I am standing at a complete loss – can anybody shed some light on this?
 * Cheers,
   Merlin
 * PS: I am using a child of twentytwelve with only minor tweaks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcommand-line-parameter-ignored%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * (@mbigul)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/command-line-parameter-ignored/#post-18952824)
 * Hi [@merlinsilk](https://wordpress.org/support/users/merlinsilk/),
 * In most cases, WordPress ignores the unknown query parameters and serves the 
   requested page. Are you passing any query parameters other than y=123456?
 * Are you using any security, caching, or SEO plugins that could be affecting URL
   handling?
 * We hope you are using the latest version of WordPress and have placed the URL
   rewrite code just above the WordPress block in the .htaccess file. 
   Please try
   the following code after _**a full site backup**_ and check whether it helps 
   or not.
 *     ```wp-block-code
       RewriteEngine On RewriteCond %{QUERY_STRING} ^[a-zA-Z]=[0-9]+$ [NC]  RewriteRule ^$ - [R=404,L]
       ```
   
 * As an alternative, you can also try plugins like [https://wordpress.org/plugins/redirection/](https://wordpress.org/plugins/redirection/)
   for URL redirections.
 *  Thread Starter [Merlin Silk](https://wordpress.org/support/users/merlinsilk/)
 * (@merlinsilk)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/command-line-parameter-ignored/#post-18953712)
 * Thanks for the reply!
 * I had been suspicious that WP would just ignore unknown parameters and I am glad
   that you can confirm this.
 * I will try the option for .htaccess you suggested, but using the redirection 
   plugin seems to preferrable and more general solution. Unfortunately I ran into
   a severe site error and have already asked for help on that.
 * Cheers,
   Merlin
 *  [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * (@mbigul)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/command-line-parameter-ignored/#post-18953963)
 * You are welcome. Please try the workarounds after you have fixed the severe error
   on your site, and let us know your feedback.
 *  Thread Starter [Merlin Silk](https://wordpress.org/support/users/merlinsilk/)
 * (@merlinsilk)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/command-line-parameter-ignored/#post-18954817)
 * Thank you again!
 * that [NC] did not seem to make a difference, but I was able to get ‘redirection’
   to work (Thanks John for the instructions to remove quickppr_redirects from the
   options) and now Google can learn that all those links are just 404s.
 * Remains to convince Google to come by and take a look.
 * Cheers,
   Merlin
 *  [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * (@mbigul)
 * [1 month, 1 week ago](https://wordpress.org/support/topic/command-line-parameter-ignored/#post-18955114)
 * Hi Merlin,
 * You are welcome. Happy to know you are getting the expected results using the
   Redirection plugin 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcommand-line-parameter-ignored%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

## Tags

 * [url rewrite](https://wordpress.org/support/topic-tag/url-rewrite/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 2 participants
 * Last reply from: [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * Last activity: [1 month, 1 week ago](https://wordpress.org/support/topic/command-line-parameter-ignored/#post-18955114)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
