301 404 Redirect to New Pages through .htaccess

0
2391

Problem: Site moved from asp to php (Windows Server to Linux). Old Links (Eg. www.addictiveblogs.com/ABC/Home.aspx) are not available on new server.

Solution:  .htaccess file can do this for you.

For Example Want to Redirect www.addictiveblogs.com/ABC/Home.aspx page traffic to www.addictiveblogs.com write following code in .htaccess file place that file in ABC folder.

[code] Redirect 301 /ABC/Home.aspx https://www.addictiveblogs.com/ [/code]

And if Want to redirect traffic of www.addictiveblogs.com/ABC/ link then add following line as well

[code] Redirect 301 /ABC https://www.addictiveblogs.com/ [/code]

Now Traffic of Both Links will be redirected to your home page.

code:

[code] Redirect 301 /ABC/Home.aspx https://www.addictiveblogs.com/ #/ABC/Home.aspx Old Link
Redirect 301 /ABC https://www.addictiveblogs.com/ #/ABC/ Old Folder Link[/code]

This on StackOverFlow Here

LEAVE A REPLY

Please enter your comment!
Please enter your name here