Post by itrends » Mon Nov 19, 2012 4:42 am

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 :)

Active Member

Posts

Joined
Tue Jul 14, 2009 7:54 pm

Post by itrends » Mon Nov 19, 2012 5:06 am

Hola.

Worked it out :)

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

Active Member

Posts

Joined
Tue Jul 14, 2009 7:54 pm
Who is online

Users browsing this forum: Bing [Bot] and 61 guests