SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: ?id=9_0_7_0_C

  1. #1
    Non-Member Dan's Avatar
    Join Date
    Feb 2005
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ?id=9_0_7_0_C

    Right, so i've just setup a mod-rewrite that goes like:

    http://www.webpage.com/tutorial/9_0_7_0_C/

    Now i need to 'hack' my CMS, it currently displays it as "?id=9_0_7_0_C". Is there any way-what-so-ever to get rid of "?id=" and just display the "9_0_7_0_C" ??

    Thanks for any help in advance.

  2. #2
    SitePoint Guru hifigrafix's Avatar
    Join Date
    Oct 2005
    Location
    Nashville, TN
    Posts
    628
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    um... just delete it?

    can you show us the code where your CMS is displaying it? Which CMS are you using?

  3. #3
    Non-Member Dan's Avatar
    Join Date
    Feb 2005
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well theres a tag "%%entry_id%%" that displays as "?id=9_0_7_0_C", maybe theres some javascript or quick and easy way to get rid of the "?id=" with hacking the actul cms. ??

    CMS = Pmachine btw.

  4. #4
    SitePoint Evangelist tetsuo shima's Avatar
    Join Date
    Oct 2005
    Location
    Switzerland
    Posts
    597
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,
    What I don't understand is why, if you've set up your mod_rewrite correctly, it is not rewriting URLs without the '?id=' string?

    Useful links:
    http://www.sitepoint.com/article/sea...-friendly-urls
    http://www.sitepoint.com/article/guide-url-rewriting
    The SEO Faq thread
    Dependency injection made easy: Phemto

  5. #5
    SitePoint Addict DA Master's Avatar
    Join Date
    Apr 2004
    Location
    /etc/php.ini
    Posts
    398
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How about using a find and replace?

  6. #6
    SitePoint Evangelist LemoNade's Avatar
    Join Date
    Aug 2005
    Location
    Southampton, UK
    Posts
    500
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Couldn't you just do:

    PHP Code:
    $goto $_GET['id'];
    header('Location: $goto'); 
    Or have I misunderstood?

    -Will

  7. #7
    Non-Member Dan's Avatar
    Join Date
    Feb 2005
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The mod-rewrite works, but the cms is displaying the links as "?id=9_0_7_0_C", so i think all i need to do is a find and replace on "?id=" to "/".

  8. #8
    SitePoint Evangelist LemoNade's Avatar
    Join Date
    Aug 2005
    Location
    Southampton, UK
    Posts
    500
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $id "?id=9_0_7_0_C";
    $id str_replace("?id""/"$id); 
    Try that.


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
  •