Reputation: 3
My old site was built on Joomla+Virtuemart engine, now i've created new one on Wordpress.
My problem is Google's index - many visitors still coming by old URL's (http://example.com/component/virtuemart/123.html
, etc).
I want to make 301 Redirect on new site's frontpage (http://example.com
), if user arrives from old URL, that contains this part:
/component/virtuemart/any_url
. I'm not very expirienced in regular expressions, so please help me to write working expression for my htaccess file.
Upvotes: 0
Views: 100
Reputation: 71568
Using mod_alias, you might use:
RedirectMatch 301 ^/component/virtuemart.* http://mydomain.com/newaddress
Or using mod_rewrite:
RewriteEngine On
RewriteRule ^component/virtuemart.* /newaddress [L,R=301]
I based those on this answer.
Upvotes: 1