1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

rewrite help needed to remove end of url and explaination.

Discussion in 'Apache' started by nobluff, May 20, 2009.

  1. #1
    Hi,

    I think this is simple, so hopefully someone can help and explain.

    I have several php urls that end in :

    .php?sortby=1&rev=1
    .php?sortby=12&rev=2
    .php?sortby=2&rev=1

    etc.

    This php code is used to sort information on the page.

    I want to remove everything from (and including) ?sortby= so that the url ends in .php.

    I also want to make sure that the variables will still be available for the php code, so for the first example above, the url will end in .php in the browser yet the sortby and rev variables will still be known within the php code.

    I would also like to know that google/yahoo will no longer see any of the urls as ?sortby=1&rev=1.

    Is it simple? and can you help?

    Thanks.
     
    nobluff, May 20, 2009 IP
  2. nobluff

    nobluff Well-Known Member

    Messages:
    639
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    100
    #2
    Is this to complicated? I am really stuck here.
     
    nobluff, May 21, 2009 IP
  3. Lpe04

    Lpe04 Peon

    Messages:
    579
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it's not complicated, you can't just remove them though.

    A) Try using a canonical URL tag if you don't want search engines indexing your page twice, or

    B) you must put the variable somewhere in the URL, like
    http://www.top-country-videos.com/category/tim-mcgraw rather than ?category=tim-mcgraw

    there is no other way to do it.

    Cheers!
     
    Lpe04, May 23, 2009 IP
    nobluff likes this.