Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor
Redirect to a New Folder Gian04 msg:4322679 12:01 am on Jun 7, 2011 (gmt 0) I have dynamically generated URLs that need to be redirected to a new folder Old URL
How can I redirect Old URL to a New URL? Note that the "
" part of the URL are dynamic, the only part that I want to change is the "
" to "
g1smd msg:4322682 12:23 am on Jun 7, 2011 (gmt 0)
What RewriteRule code have you tried? There's about 15 000 previous examples to guide. The redirect is the LAST step in the process. The first step is that the links on your pages need to point to the right URL. It is too late to "change" a URL after a link is clicked. The redirect is there merely to encourage users and searchengines alike to update the URLs they have indexed.
Gian04 msg:4322698 12:40 am on Jun 7, 2011 (gmt 0)
Im transferring the "oldfolder" to the "newfolder", and soon will delete the oldfolder, so anyone who have bookmarked the oldfolder will be redirected to the newfolder, but preserving the other part of the URL like the query string.
g1smd msg:4322701 12:42 am on Jun 7, 2011 (gmt 0)
Yes, just one line of code should get that job done.
RewriteRule ^old-path http://www.example.com/new-path [R=301,L]
Query strings data is automatically re-appended.