Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28058

Friendly URLS working, but how to redirect the non-friendly URL to the new friendly URL?

$
0
0
I have managed to get rewrites working, along the lines of domain.com/linkdetails.aspx?id=5 to domain.com/contact etc. Now, the problem is, google has indexed all the unfriendly urls previously. I already have this rewrite in place from the friendly url to the linkdetails.aspx?id= type format... how can I place a redirect from the linkdetails.aspx url to the friendly url to forward all traffic, and stop there being a duplicate page? Will that work, or end in a loop? If anyone has any examples of how to match a redirect when using dynamic 'id's' that'd be really helpful so I can test it. Thanks for any help in advance. Example: Here is an example rule. The first makes the friendly URL work.. and I was hoping the second one would redirect the unfriendly to the friendly! First one works.. second one doesn't. Is what I'm trying possible? I just need to map around 30 urls by hand.. nothing too dynamic. (rule name="Enable friendly URL") (match url="contact" ) (action type="Rewrite" url="Linkdetails.aspx?lnkid=21") (/rule) (rule name="Redirect from Unfriendly to Friendly") (match url="Linkdetails.aspx?lnkid=21") (action type="Redirect" url="contact") (/rule )

Viewing all articles
Browse latest Browse all 28058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>