Quote:
|
Originally Posted by eristoddle
My one tip is to learn mod rewrite.
|
I see lots of people talk about using mod_rewrite to make URLs better, but is there a reason why no one seems to use a script that parses the URL chunks and determines what to do?
For example, for the URL
www.somedomain.com/locations/wyoming/cheyenne/ why not have a script named "locations" that looks at the URL chunks and determines what to do? That seems a lot easier and flexible than having to setup a bunch of mod_rewrites.
Use forcetype in your Apache httpd.conf (or in an .htaccess file) to force it to use PHP (or whatever you're using) for that script:
Code:
<Location /locations>
ForceType application/x-httpd-php
</Location>