This forum has been moved here:
Helicon Tech Community Forum

ISAPI_Rewrite 3.0 (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: Redirect to new landing folder
Author
Message |
vallas
Newbie


Joined: 22 February 2012
Posts: 9
Posted: 22 February 2012 at 12:40pm

Hi.
I am new to this. I have been searching and testing with
no success yet, so I am asking for help.

We have a site right now that has URLs like the
following:

http://www.mysite.com/current
http://www.mysite.com/current/products
http://www.mysite.com/current/pages/type.aspx
http://www.mysite.com/current/service/docs

We are setting up a new "landing" folder, but since a lot
of the URLs are already indexed in Google we want to have
everything redirected; the "current" folder will not
exist anymore. If someone types/links to the previous
they should go to:

http://www.mysite.com/new
http://www.mysite.com/new/products
http://www.mysite.com/new/pages/type.aspx
http://www.mysite.com/new/service/docs

Thanks everyone.
Back to Top
 
Guests
Guest


Joined: 01 October 2003
Online Status: Online
Posts: -160
Posted: 23 February 2012 at 6:49am

Hello,

try using the following:

Code:
RewriteEngine on
RewriteBase /

Rewriterule ^current(.*)$ /new$1 [NC,R=301,L]


Regards
Andrew

Back to Top
 
vallas
Newbie


Joined: 22 February 2012
Posts: 9
Posted: 23 February 2012 at 9:40am

I initially typed the code wrong, but it works great.

Thank you!
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version