Mobile app version of vmapp.org
Login or Join
Carla537

: Apache rewrite rule that matches a specific query string I need to rewrite a specific wordpress url to a 404 error: ?page_id=15 => 404 How can I match the query string? Apparently Apache doesn't

@Carla537

Posted in: #Apache #ModRewrite #QueryString

I need to rewrite a specific wordpress url to a 404 error:

?page_id=15 => 404

How can I match the query string? Apparently Apache doesn't feed that to the rewrite mod...

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

1 Comments

Sorted by latest first Latest Oldest Best

 

@Vandalay111

Using mod_rewrite, you can match a query string using this:

RewriteCond %{QUERY_STRING} page_id=15
RewriteRule .* - [R=404]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme