old to new url
8 posts
• Page 1 of 1
old to new url
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..
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..
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: old to new url
Hello,
How many of those do you have? Is it just one or are there many?
Regards
Andrew
How many of those do you have? Is it just one or are there many?
Regards
Andrew
Re: old to new url
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
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
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: old to new url
Can't think of anything better than a simple rule as in the following:
Your mapfile must be located in the same folder with the rule and the content must be as in the following:
Regards
Andrew
- 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
- warriorfullights
- Posts: 19
- Joined: 28 Sep 2012, 01:54
Re: old to new url
I had it worked. Thanks for this one.
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 20 guests