Romulus Romulus - 1 year ago 48
PHP Question

How to call a PHP GET on the base URL not the current URL


I have a URL here:

This is redirected by nginx to this:

rewrite ^/(.*)/(.*) /search.php?search_last=$2&search_first=$1 last;

For example:

So it acts like but looks like

This is good and works and I have it so that it looks cleaner


If someone is at and clicks submit in a form like this:

<form class="navbar-form" action="search.php" method="GET">

They are forwarded to$2&search_first=$1

They should be forwarded to:$2&search_first=$1


How do I make a form on a page at this url:

attach the GET parameters/call to the url and not


How do I turn$2&search_first=$1


Answer Source

Try changing action="search.php" to action="../search.php"