homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Need help to create 301 dynamic redirect urls

Msg#: 4557536 posted 6:39 pm on Mar 22, 2013 (gmt 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!



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

Msg#: 4557536 posted 6:50 pm on Mar 22, 2013 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved