View Full Version : .htaccess help..

04-04-2008, 02:40 AM
i have been looking for a solution for a long url into short url
ex: http://quickfixgourmet.com/desiflames/Postnuke-Profile-Style/html/index.php?module=aiUserPages&func=viewPage&page_id=1
http://quickfixgourmet.com/desiflames/Postnuke-Profile-Style/html/1 (which would be the user id)

can this be done???

please let me know. thanks

04-04-2008, 02:48 AM
This can be done easily, I would checkout the tutorial on phpfreaks.com if you need help. Here is an example though.
RewriteEngine on
RewriteRule ^([0-9]+)*/([a-zA-Z]+)*/?$ /articles/article.php?idnum=$1&nav=$2 [L]

Where idnum and nav are your $_GET vars articles is the directory, article.php is the page name you are going to, and the stuff between the ^ and $ is regex which is another complicated subject.