homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Redirect to a New Folder

 12:01 am on Jun 7, 2011 (gmt 0)

I have dynamically generated URLs that need to be redirected to a new folder



How can I redirect Old URL to a New URL?
Note that the "
c=keywords+here" part of the URL are dynamic, the only part that I want to change is the "oldfolder" to "newfolder"



 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.


 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.


 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.

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