In blogspot the url is of format : dummy.blogspot.com/how to format computer/ This brings up the article.
I was wondering how can I implement same with PHP, mySQL and Apache. I thought I can use 404 code to do this.
1. I set up .htaccess in Apache to redirect 404 error to document /handler.php
2. In handler.php, I set up php code to query mySQL if the url matches some data. If yes then display it. If not then display a custom 404
This way urls like dummy.com/how to format computer/ can be used for separate articles. Although in real they do not exist.
Am I right in doing this? Or is it done in some other way?
I was wondering how can I implement same with PHP, mySQL and Apache. I thought I can use 404 code to do this.
1. I set up .htaccess in Apache to redirect 404 error to document /handler.php
2. In handler.php, I set up php code to query mySQL if the url matches some data. If yes then display it. If not then display a custom 404
This way urls like dummy.com/how to format computer/ can be used for separate articles. Although in real they do not exist.
Am I right in doing this? Or is it done in some other way?

Help
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.



Back to top









