Mobile app version of vmapp.org
Login or Join
Margaret670

: Redirect incomplete URL to index page 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

@Margaret670

Posted in: #Htaccess #Redirects #Url

I want to redirect specific URLs to the index page not to 404 error page (ex: www.website.com/trip-15).
If I remove any character from the URL it will go to 404 error page (ex: www.website.com/trip-1).
I want to redirect it to the index page. Any help?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Margaret670

2 Comments

Sorted by latest first Latest Oldest Best

 

@Lee4591628

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.

10% popularity Vote Up Vote Down


 

@Tiffany637

Nice question, its common to have URL and we wish to have redirect the wrongly typed URL to your home page.
I need little more information which CMS or platform you are using, it may be vary according to the server you are using, and i found the site where you can do set your costume error message or site setting to generate the code for your error.
www.htaccessredirect.net/ you can visit
as per your quarry, i think you want to redirect the pages from 404 page to your home page right.
its not about wrong/mistyped URL its about URL which is not in your site, so here is code i could generated that you can enter in your .htaccess file

//Custom 404 errors
ErrorDocument 404 yoursitename.com/index.html
I hope this will help you.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme