old to new url

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 18
Joined: 19 Mar 2012, 11:25

old to new url

10 Aug 2012, 08:40

Have old url like this

www.domain.com/some/someting-dynamic/numberID/

need to redirect to..this one..

http://www.domain-name.com/somethingelse/CAT/some

what is simplest rule for this..

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: old to new url

10 Aug 2012, 09:03

Hello,

How many of those do you have? Is it just one or are there many?

Regards
Andrew

User avatar
Posts: 18
Joined: 19 Mar 2012, 11:25

Re: old to new url

10 Aug 2012, 10:59

quite many

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: old to new url

13 Aug 2012, 06:21

Well, in this case I suggest using "Comprehensive mapfiles" described in FAQ

Regards
Andrew

User avatar
Posts: 18
Joined: 19 Mar 2012, 11:25

Re: old to new url

16 Aug 2012, 04:13

Ok tha suits. i have read about.. but would help if you can give example...
as i have clean urls on old site and clean urls no new site. need just 301 from old urls to new urls..

do i need to map files..

if you can just write sample.. for map file..

thank you

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: old to new url

16 Aug 2012, 05:48

Can't think of anything better than a simple rule as in the following:

Code: Select all
RewriteEngine on
RewriteBase /
RewriteMap mapfile txt:mapfile.txt

RewriteCond ${mapfile:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^(.+)$ http://www.domain-name.com/${mapfile:$1} [NC,R=301,L]


Your mapfile must be located in the same folder with the rule and the content must be as in the following:

Code: Select all
some/someting-dynamic/numberID/   somethingelse/CAT/some
folder/sub-folder/file     othername/sub-folder/otherName


Regards
Andrew

User avatar
Posts: 18
Joined: 19 Mar 2012, 11:25

Re: old to new url

16 Aug 2012, 05:51

ok thx that helps much

Posts: 19
Joined: 28 Sep 2012, 01:54

Re: old to new url

08 Oct 2012, 01:26

I had it worked. Thanks for this one. Image

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 19 guests