PDA

View Full Version : .htaccess short url question


angst
01-12-2010, 04:55 PM
Hello, ( this maybe a stupid question, but here goes );

current I'm doing short query strings like

www.domain.com/products/1231/88171/
which is: product.php?cat=1231&ProductID=88171

however I notice that allot of things are able to using works instead of ids like:

http://www.linuxhelp.net/guides/htaccessmysql/


how are they doing this? does guides just query "htaccessmysql" to fine the page, or is the htaccess able to query and locate the result redirecting it to some kind of id?

tomws
01-12-2010, 09:11 PM
Drupal uses clean URLs like that. The rewrite rules take everything past the domain and pass it to the handler (index.php) as a single parameter where it's read and appropriate content is delivered. As an example, these URLs for accessing the settings for Clean URLs are equivalent:
http://www.example.com/?q=admin/settings/clean-urls
http://www.example.com/admin/settings/clean-urls