Thread: Url Permalink
View Single Post
Old 09-05-2010, 04:39 PM   #3 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

You can definitely make use of Apache's mod_rewrite or Nginx's HttpRewriteModule to aid in this endeavor. If you're using something other than Apache or Nginx, the first thing you should be doing is dumping it and installing one or the other of the aforementioned web servers. ;)

On to the point though, rewrite rules are an excellent way to perform simple tasks such as removing file extensions from the url, or redirecting all 404's to a single point of entry (amongst many other fancy tricks), but rewriting your entire site one section at a time is a little bit horrendous. Especially if you're attempting to create a distributable app.

While I think the author of this article is completely off base about the 'right' way to do things, and you have to take their opinion (as with mine) with a grain of salt, it is nevertheless a pretty good article on the basics of the subject. http://www.roscripts.com/Pretty_URLs...iting-168.html -- it will introduce you to the concepts of doing it either way so that you can make the final decision as to which is best for you; just remember that when you get to the part about doing it via PHP the first sentence makes it sound an awful lot like he is about to tell you the wrong way to do things and that if you can't grasp the earlier concept you must be learning disabled of some kind. What he doesn't mention is that nearly all major CMS software does it this way, as well as most of the major frameworks as well.
__________________
uʍop ǝpısdn sı ɹǝʇndɯoɔ ɹnoʎ sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
delayedinsanity is offline  
Reply With Quote