1

I'm having an issue in trying to get my search URL to be "SEO Friendly", at the moment my URL currently looks like this - www.example.com/pagename?param1=SELECTED-FEATURE&location=ENTERED-LOCATION

If the user wants to search for multiple features the URL looks like www.example.com/pagename?param1=SELECTED-FEATURE&param1=SELECTED-FEATURE&location=ENTERED-LOCATION .

If the user selects one feature I would like my URL to be written like the following - www.example.com/pagename/SELECTED-FEATURE/ENTERED-LOCATION

If the user selects multiple features I would like the URL to be written like the following - www.example.com/pagename/SELECTED-FEATURE/SELECTED-FEATURE/ENTERED-LOCATION

I do not want to use the POST method.

Thanks, Codarz360

Codarz360
  • 424
  • 1
  • 6
  • 16

1 Answers1

1

You could put some values that the user don't need to see in a PHP Sesion or instead of sending them with GET you should use POST?

BRap
  • 529
  • 2
  • 10
  • 29
  • I don't want to use the POST method due to the fact that when you click back you are asked resubmit the form. – Codarz360 Jul 11 '13 at 12:18
  • Then you could first save the users data in a Sesion variable and then relode to the same page or something... – BRap Jul 11 '13 at 12:27
  • 1
    For redirecting you can use something like this: $current_url = explode("?", $_SERVER['REQUEST_URI']); header('Location: '.$current_url[0]); But it must be declarated befor HTML code.. – BRap Jul 11 '13 at 12:34