I want to redirect specific URLs to the index page not to 404 error page (ex: http://www.website.com/trip-15).If I remove any character from the URL it will go to 404 error page (ex: http://www.website.com/trip-1).I want to redirect it to the index page. Any help?
Redirect incomplete URL to index page
htaccess;redirects;url
Redirecting all mistyped URLs to the homepage isn't generally best practice. This is why we have 404 pages - to tell users that they've landed on a non-existent page. Instead, here are a few tips:Make your 404 page friendly and useful. Don't make users feel like they've done something wrong, but make it REALLY easy to get where they want to be. Give them a search box, and maybe some links to your most popular pages. If your site is really smart, take what's been typed in as a URL and display some you typed this, did you mean that? suggestions.Regularly review Crawl Errors in Google Webmaster Tools. This shows you pages that Google has found that don't work (404, 500, etc) and help you identify where these links might be coming from. You may be able to get 3rd parties to fix their links.Use your list of 404 Crawl Errors to determine which individual pages to 301 redirect. So if you see references to /tirp-15 you can 301 that to /trip-15 and actually get users where they want to be.This may be a bit more work than just mass-redirecting everything, but on an ongoing basis it'll lead to a much better user experience AND ranking for your pages overall.