Remove Query String from 301 Redirect – htaccess

// 301 this:
// to this:
RewriteRule ^subdir-1(.*) [L,R=301]

Query strings in URLs can be awesome for page functions, and other times extremely pesky. Especially if you dont want to carry over the value from the old/redirected page.

The above snippet can be added to your .htaccess file to remove the query string, upon a rewrite and additionally using a 301.

Want a Fast Server Like Mine?