Home 301 redirects redirecting not the specified link
Reply: 2

301 redirects redirecting not the specified link

Scorpioniz
1#
Scorpioniz Published in 2018-02-13 14:46:40Z

want to redirect some links from oldsite to new one and doing like this:

Redirect 301 /benefits  http://newsite.com/our-differiantiators/
Redirect 301 /benefits/our-people http://newsite.com/about-us/
Redirect 301 /benefits/our-places http://newsite.com/infrastucture/
Redirect 301 /benefits/our-platforms    http://newsite.com/infrastucture/
Redirect 301 /benefits/our-experience http://newsite.com/
Redirect 301 /benefits/our-testimonials http://newsite.com/

but if i try to go to my newsite.com/benefits/our-people it redirecting to newsite.com/our-differiantiators/our-people not newsite.com/about-us

how should I fix my .htaccess code to redirect like I want?

P.S. maybe it's because slug /our-people and /our-differiantiators and wordpress somehow is handling that?

Mohammed Elhag
2#
Mohammed Elhag Reply to 2018-02-13 15:23:43Z

change this line :

Redirect 301 /benefits  http://newsite.com/our-differiantiators/

by this :

RedirectMatch  301 /benefits/$  http://newsite.com/our-differiantiators/

with new rule RedirectMatch you will match only benefits/ ,ended with slash, directory when it comes alone otherwise the other rules will work

vpalade
3#
vpalade Reply to 2018-02-13 15:12:06Z

Try to write: Redirect 301 /benefits http://newsite.com/our-differiantiators/ at the end of file;

Or you can change the first line with: RedirectMatch ^/benefits$ http://newsite.com/our-differiantiators/

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.349504 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO