get url

Discussion in 'PHP' started by jonhyhar, Mar 26, 2010.

  1. #1
    hi guys, could someone help me? i have 4 url's, they're

    http://www.google.com
    http://google.com
    http://www.google.com/kjashdkjasd.html
    http://google.com/kjashdkjasd.html
    Code (markup):
    How can i get always google.com with these url's?

    thank you very much :confused:
     
    jonhyhar, Mar 26, 2010 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #2
    google will have a .htaccess to manage the canonisation issue and a 404 handler to manage the fake page requests.
     
    sarahk, Mar 26, 2010 IP
  3. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #3
    use str_replace and parse_url to get the desired output
     
    JAY6390, Mar 26, 2010 IP