How does a site like SO put the title of the question dynamically into the url bar.
Is this through rewritemapping and mod rewrite and how can I do it on a normal web host. Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In this URL:
the only part that matters is the question ID,
10903041. So just set up a redirection rule that ignores anything at the end of the URL, much like this:The PHP script can then redirect to the correct title if the title is not already provided or is incorrect; much like what happens when you visit https://stackoverflow.com/questions/10903041/why-is-this-question-title-so-wrong?.