I had an old website, then I deleted it and set a 301 redirect of its domain to my new website. But there is a problem: when people click the old links to the internal pages of the old website, it redirects them not to the main page of the new website but to the pages that don't exist and they get a 404 page. Example of what happens: <link>oldsite/page1</link> ---> newsite/page1 (404) How can I change it so that all old links led to the main page of the new website? Should I set a redirect manually for all the old pages that I had before?
add this code to your .htaccess. replace yourwebsiteurl.com with your site which you want to be redirected. hope this helps -Viraj-
Are you sure this is the correct code? Can I place it anywhere in the file? I ask because nothing changes ((