Page 1 of 1

Redirect rule for manufacturers ?

Posted: Mon Nov 19, 2012 4:42 am
by itrends
Hi All.

Any ideas how I might write a wild card regular expression in the htaccess file (or elsewhere?) to do the following

www.domain.com/name-goes-here-designer
redirects to
www.domain.com/designers/name-goes-here

www.domain.com/name-that-is-longer-here-designer
redirects to
www.domain.com/designers/name-goes-here

All the 'from' urls have '-designer' on the end
All the 'to' urls re-format it so that the category is /designers/ followed by the name

I have no idea how to write the rule for this though so any help really really welcome :)

Re: Redirect rule for manufacturers ?

Posted: Mon Nov 19, 2012 5:06 am
by itrends
Hola.

Worked it out :)

RewriteRule ^(.*)-designer /designers/$1 [R=301,L]