SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CleanURL Problem

    Hi,

    I'm having a problem with one of my cleanURLs. The code I have is:
    Code:
    RewriteRule /support/view-ticket/(.*)/(.*)/$ /view-ticket.php?ticketID=$1&ticketStatus=$2 [I,L,U,O]
    Problem is, $ticketID simply becomes $1/$2. i.e. if $1 is 5 and $2 is 10, I would have $_GET['ticketID'] being 5/10 and ticketStatus non-existant.

    Any help would be appreciated.

    Cheers,
    Rhys

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2011
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    Code:
    RewriteRule /support/view-ticket/(\d+)/(\d+)/$ /view-ticket.php?ticketID=$1&ticketStatus=$2 [I,L,U,O]

  3. #3
    SitePoint Guru TacMaf's Avatar
    Join Date
    Dec 2005
    Location
    Manchester, United Kingdom
    Posts
    663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. The problem turned out to be an earlier rewrite in a different format. It's now:

    Code:
    RewriteRule /support/view-ticket/$ /view-ticket.php [I,L,U,O]
    RewriteRule /support/view-ticket/([0-9]+)/$ /view-ticket.php?ticketID=$1 [I,L,U,O]
    RewriteRule /support/view-ticket/([0-9]+)/([0-9]+)/$ /view-ticket.php?ticketID=$1&ticketStatus=$2 [I,L,U,O]


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
  •