background preloader

URL Rewriting for Beginners

URL Rewriting for Beginners
A beginner's guide to URL rewriting, with plenty of examples. Introduction URL rewriting can be one of the best and quickest ways to improve the usability and search friendliness of your site. It can also be the source of near-unending misery and suffering. Definitely worth playing carefully with it - lots of testing is recommended. With great power comes great responsibility, and all that. There are several other guides on the web already, that may suit your needs better than this one. Apache URL Rewriting Guide - The best guide around Before reading on, you may find it helpful to have the mod_rewrite cheat sheet and/or the regular expressions cheat sheet handy. What is "URL Rewriting"? Most dynamic sites include variables in their URLs that tell the site what information to show the user. The problems with this kind of URL structure are that the URL is not at all memorable. Clearly a much cleaner and shorter URL. Now we're getting somewhere. Platforms and Tools Basic URL Rewriting number} .

http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/

Related:  web dev

So You Want to Accept Credit Cards Online? Until recently, accepting credit cards on a website was expensive and complicated. But that was before Stripe: a radically different and insanely awesome credit card processing company. Today, I'll show you how to start accepting cards in 30 minutes or less - without spending a dime. Republished Tutorial Using .htaccess to add trailing slashes to all URIs or URLs Apache's Rewrite Module allows developers to define extensive URL Rewriting and Redirecting Conditions & Rules, one of which could be to add trailing slashes to Representational State Transfer (RESTful) URLs. RESTful URLs are Uniform Resource Indicators (URIs) that are more user- and SEO-friendly than standard GET-based URIs. For example (GET vs.

Big Ball of Mud Brian Foote and Joseph Yoder Department of Computer Science University of Illinois at Urbana-Champaign 1304 W. Springfield Urbana, IL 61801 USA foote@cs.uiuc.edu (217) 328-3523 yoder@cs.uiuc.edu (217) 244-4695 'MySQLi' for Beginners Introduction Nearly every site that you visit nowadays has some sort of database storage in place, many sites opt to use MySQL databases when using PHP. However, many people haven't yet taken the step to interacting with databases properly in PHP. Here we guide you through what you should be doing - using PHP's MySQLi class - with a hat-tip to the one way that you definitely shouldn't be doing it. The Wrong Way If you're using a function called mysql_connect() or mysql_query() you really need to take note and change what you're doing.

Understanding Event Delegation Event delegation allows us to attach a single event listener, to a parent element, that will fire for all descendants matching a selector, whether those descendants exist now or are added in the future. For the remainder of the lesson, we will reference the following HTML structure: When an anchor in our #list group is clicked, we want to log its text to the console. Normally we could directly bind to the click event of each anchor using the .on() method: While this works perfectly fine, there are drawbacks. Consider what happens when we add a new anchor after having already bound the above listener: Crazy Advanced Mod_Rewrite Tutorial Are you an advanced mod_rewrite expert or guru? This article is for YOU too! Just make sure to read all the way to the bottom..

Well-Intentioned Destruction The custom-built PHP-based content management system suffered from the classic problem of too many cooks in the kitchen. Every code file had conflicting naming conventions and coding styles, structures and duplicate methods all over the place; a Big Ball of Mud. And Dan S. was thrown head first into it. Dan was trudging through the usual drudgery of low-to-medium priority tickets, when suddenly the heavens cracked open and a Very High priority ticket descended from the sky; the first he'd ever seen.

How to: find ANYTHING on the Internet Photo by Dullhunk Tips, tricks and resources to help you find that digital needle in the huge cyber-haystack. Learning to navigate the World Wide Web effectively is an important skill, and there are lots of different ways for you to find the information you are looking for. Cookie-less Session Variables in JavaScript This page uses cookie-less session variables in JavaScript. Refresh or navigate away from this page and click back to see the effect in operation. You have visited this page: 1 time Unicode Transformation Formats The ISO 10646 Universal Character Set (UCS, Unicode) is a coded character set with more than 40'000 defined elements. It is expected that this cardinality will grow to more than 100'000 soon, through additional definitions for characters that do not yet have a coding, so that all the world's characters will be represented in Unicode. But how can you represent more than 2^8 = 256 characters with 8bit bytes? This chapter explains and discusses the concepts of coded character sets versus their encoding schemes as well as the various Unicode representation schemes along with their implementation level on Unix: most prominently UTF-8 beside its precursors EUC and UTF-1 and its alternatives UCS-4, UTF-16, UTF-7,5, UTF-7, SCSU, HTML, and JAVA. Another fine web page describing these subjects is Jukka Korpela's tutorial on character code issues.

Related: