Welcome to WebmasterWorld Guest from 54.161.110.186

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)



Hello,

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



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.

if:
- 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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month