Post by KDNovelties » Tue Oct 31, 2017 11:46 pm

Hi, I have a lot of old (pre OC) urls with query strings that I need to redirect to the new url. Basically I just need to drop the url. For example I need this: ... view=write

changed to: ... ed_22.html

Just drop the ?review=write query string. How can I do this for multiple urls in the htaccess.


User avatar
New member


Sat May 27, 2017 12:12 am

Post by MrPhil » Thu Nov 02, 2017 6:25 am

Code: Select all

RewriteRule  ^(.*)$$1?  [R=301,L]
might do it for you. The '?' by itself should suppress any existing Query String. If you need to narrow the scope of which URLs are rewritten, add one or more RewriteConds.

Update: I just noticed I wrote RewriteCond instead of RewriteRule. Fixed. Also, since this is redirecting to another site (domain), you'll need the domain name too.

Active Member


Wed May 10, 2017 11:52 pm
Who is online

Users browsing this forum: No registered users and 3 guests