SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Encoding / for use with search engine friendly URLs

    Hi,

    I'm using the article at http://www.promotionbase.com/article/485 to create a PHP website with search engine friendly URLs but am having some problems with querys containing / For example I pass in values like page/code/24/ where 24 is assigned to code so it's the eqivalent of page?code=24 if I try and pass in page/code/24/7/ then code is still assigned to 24, I thought I could get around this by using urlencode() which generates a url of page/code/24%2F7/ however this gives me a 404 Page Not Found error, passing in other encode things such as < > * etc. works fine.

    Please can somebody help me with this as I want to get the site online soon and it's driving me nuts.

    Thanks,

    Tom

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you could do is choose a character to represent /, such as *, then if you find * in the url you can replace it with / in your script

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have toyed with the idea of doing this but was wondering if there was another way as I didn't want to have to recode it if I added * (or whatever I chose) to the code value.

    Thanks

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that is going to be the best way to do it

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


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
  •