I want to redirect url's who contains a string "cfg-contactform", the requested url contains sometimes mixed string like "cfg-contactform-15, 16, 22" etc... but I want to redirect all url's with string "cfg-contactform" including numbers or something others...
The solutions what I tried are:
htaccess redirect if URL contains a certain string
redirect if url contains specific string using htaccess
htaccess redirect if URL contains a certain string
What I do wrong in my examples?
RewriteCond %{QUERY_STRING} cfg-contactform
RewriteRule .? / [R,L]
or
RewriteCond %{QUERY_STRING} cfg-contactform [OR]
RewriteCond %{REQUEST_URI} inc
RewriteRule ^ /? [L,R=301]