I’m trying to setup a rewrite rule and I need it to apply to a large number of URL’s. How can I set a wildcard so that if a directory starts with a certain word ( like ‘how’ or ‘can’) , the rewrite is applied?
This is what I have currently and it is not working
RewriteRule ^/can(.*)$ http://www.domain.com/ [R=301,L]
Since you’re in a .htaccess file, you need to remove the contextual path prefix from the pattern (in this case probably
/):