I'm using mod_rewrite to process variables in the URL. For many of my URLs the final portion of the string doesn't matter because I'm not using it. For instance:
I'm only using the "company-25" portion to tell me which company is being requested (company # 25). The "jb-hunt" portion isn't needed. It's only to make a pretty URL for SEO purposes or whatever.
Well sometimes the final portion of the string might be wrong but I know what page they're requesting. For instance, someone links to my site with a typo. They meant to link to:
But they accidentally linked to:
I know they want company #25 but the URL is wrong. How should I handle this?
From a user's standpoint I should probably redirect them to the correct page instead of issuing a 404. This is easy to do.
But what about from an SEO standpoint?
Would a 301 redirect be the way to go even though the page being requested never existed?
Should I show the page anyhow using the wrong URL but use a canonical tag to point search engines to the correct URL? (probably not)
Should I issue a 404 and say the heck with the user experience? (probably not)
Can I issue a 404 for the original request but then redirect the user to the correct page without them even knowing that the original was a 404?
What's the best way to handle this?