How to make URL Safe strings for mod_rewrite using PHP

It’s relatively easy to make URL safe strings for use by mod_rewrite. Let’s use the example that you have a form that adds a new blog post to your site. When the user submits this form, you want to generate a URL safe string (based on the title of the blog post) for mod_rewrite to use. This little snippet will show you how this can be achieved in one line of code in PHP.
Read More…

Posted in Mod_Rewrite, PHP, Tools at July 11th, 2010. 3 Comments.