Reputation: 1644
I Have moved my site from asp to php. I want to redirect my Old ULR which is
http://www.mysite.com/ABC/Home.aspx
to new URL
http://www.mysite.com
How to do that?? I came to know we can do this .htaccess file. but i don't know about its programing. can some body share a code with me? and where to place this code?? in Main .htaccess file or create a .htaccess file in my ABC folder??
Upvotes: 1
Views: 7802
Reputation: 1644
I Used following code in .htaccess file
Redirect 301 /ABC/Home.aspx http://www.addictiveblogs.com/
Redirect 301 /ABC http://www.addictiveblogs.com/
and put this .htaccess file in my ABC folder. It works fine for me. Now Redirecting my All traffic http://www.addictiveblogs.com/ABC/Home.aspx and http://www.addictiveblogs.com/ABC/ to my Home Page.
Source: http://www.addictiveblogs.com/301-404-redirect-to-new-pages-through-htaccess/
Upvotes: 2
Reputation: 1021
Check this link if your site on Apache server
http://www.htaccessredirect.net/
Edit
User this code in your .htaccess
ErrorDocument 404 /index.php
Upvotes: 0