Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
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.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Is this how blogspot finds articles


  • Please log in to reply
1 reply to this topic

#1 Romeo29

Romeo29

    Learning To Bleep


  • Members
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:02:16 AM

Posted 17 January 2010 - 03:34 AM

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?

BC AdBot (Login to Remove)

 


#2 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,260 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:11:16 PM

Posted 18 January 2010 - 07:16 AM

I'm not sure... I know that Wordpress has this option, and it's PHP. Maybe digging through the source will be revealing?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users