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:
https://www.site.com/sesame-street/abc- ... view=write
https://www.kdnovelties.com/sesame-stre ... ed_22.html
Just drop the ?review=write query string. How can I do this for multiple urls in the htaccess.
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.
Code: Select all
RewriteRule ^(.*)$ https://www.kdnovelties.com/$1? [R=301,L]
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.
Who is online
Users browsing this forum: No registered users and 3 guests