Forum Moderators: phranque
I want to make:
domain.com/question.php?fn=view&id=444
to
domain.com/444-these-words-dont-matter.htm
I don't want to make the .htm page show up in my logs as a 404 which is what a lot of them carry with them. I'm absolutely stumped. Any insights, not even the answer would be helpful. Thanks!
Be aware that "these-words-dont-matter" is a potential time-bomb. It invites serious duplicate-content problems in search ranking, and it invites googlebombing by your competitors, who could easily undertake a campaign to see that the URL "your-site.com/444-the-most-fraudulent-and-dishonest-site-on-the-web-today.htm" ranks number one for all of your most-important keywords. Make darn sure that your "question.php" script fully-validates that part of the URL and sends either a 404 response or a 301 redirect to the correct, single, canonical URL for "444" unless the "dont-matter" string is exactly what you expected.
For basic info on your static/SEO-friendly-URL -to- script-filepath rewriting question, see Changing Dynamic URLs to Static URLs [webmasterworld.com] in our Apache Forum Library.
Thanks,
Jim
To connect those new URL requests to the real internal script location, you'll need a rewrite.
To force people using the old URLs to update to using the new URLs you'll need a 301 redirect, placed before the rewrite.