Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Need help to create 301 dynamic redirect urls

6:39 pm on Mar 22, 2013 (gmt 0)

New User

joined:Aug 3, 2012
posts: 5
votes: 0


I have one question about is it possible to create dynamic 301 redirect urls.

I have a dating site and the url format is like /dating/united_states_singles/. A few months ago, I changed it to /free-dating/united_states/ (added free and removed singles). When I checked on Google webmaster tool, both URLs (old and new) are indexed, which create duplicate title and description tags.

Is it possible to create 301 redirect for all old urls to new urls format?

Thanks very much!
Have a nice day!
6:50 pm on Mar 22, 2013 (gmt 0)


WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
votes: 8

welcome to WebmasterWorld, jennypretty!

it depends on if and how you can identify and define the pattern of the old urls translating to the new urls.

- all the old urls to be changed start with /dating/
- all the new urls start with /free-dating/
- all the old urls to be changed end with country_name_singles/
- all the new urls end with country_name/
then the answer is yes, you can do this with a single mod_rewrite directive using RewriteRule using capture groups in the pattern and backreferences in the substitution string.

if there's more going on than i assumed above then you will have to provide a comprehensive problem description.