Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htaccess help..

    i have been looking for a solution for a long url into short url
    ex: http://quickfixgourmet.com/desiflame...Page&page_id=1
    into
    http://quickfixgourmet.com/desiflame...e-Style/html/1 (which would be the user id)

    can this be done???

    please let me know. thanks

  • #2
    New Coder zfred09's Avatar
    Join Date
    Dec 2006
    Posts
    69
    Thanks
    0
    Thanked 5 Times in 5 Posts
    This can be done easily, I would checkout the tutorial on phpfreaks.com if you need help. Here is an example though.
    Code:
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •