There will often be times when you want to redirect users from one page to another page on a permanent basis. Especially when the original page shows up in search results. The last thing you want is for users to click onto your content, and be presented with an ugly ''Sorry, page not found''.
Using .htaccess
To redirect users to the new page from the old page, we can use 301 redirects in an .htaccess file. This file should be located at the root of your public website. If you want to redirect the user from /my_old_page to /my_new_page, put the following in your.htaccess file.\r\n
Redirecting to other sites
This isn''t just limited to redirecting within your own site. You can redirect to other sites too:\r\n
A 301 redirect is the most search engine friendly way to redirect the page, as it means the page has moved permanently.
- admin's blog
- Login to post comments