SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    question in RewriteRule

    hi,

    PHP Code:
    RewriteRule ^(.*)(backslash)/(backslash)?sort=(.*)&order=(.*)$ category.php?catname=$1&sort=$2&order=$
    ====
    (backslash) mean \
    ====

    i want to make ? just char in Rewrite link
    put \ after it doesn't work

    to make this

    Code:
    http://localhost/prog1b2/antivirus/?sort=softcount&order=asc
    same this

    Code:
    http://localhost/prog1b2/category.php?catname=antivirus&sort=softcount&order=asc

  2. #2
    SitePoint Evangelist
    Join Date
    May 2006
    Location
    Denmark
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... try this

    Code:
    RewriteCond %{QUERY_STRING} sort=([a-zA-Z]+)
    RewriteCond %{QUERY_STRING} order=([a-zA-Z]+)
    RewriteRule ([a-zA-Z]+) category.php?catname=$1&sort=%1&order=%2

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    doesn't work else


Bookmarks

Posting Permissions

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