How to replace question marks(?) with bars(/)?

Asked

Viewed 44 times

0

How do I replace the parameter question marks in the url with bars ? For example, pass myword/start.php? page=2 for mydomain/home/page/2.

A piece of my code:

if (isset($_GET['page']))
{
    $page = $_GET['page'];
}
else
{
    $page = 1;
}

JS:

$("#next").click(function() {
    page = page + 1;

    location.href = "?page="+page+"";
});
  • this is done with apache . htaccess file, search for url_rewrite that finds a lot of stuff.

  • As @Neuberoliveira said, and actually on . htaccess. Here’s a good start for you https://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/

  • Good, One of the solutions is terms URL’s amigavies, I hope the following is useful to explain to you how this is done: http://blog.thiagobelem.net/aprendendo-urls-amigaveis

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.