![]() |
PHP hiding the variable type but showing the value. Hi Guys, Does anyone know how I can change a url from this: example.com/?id=example1 to: example.com/example1 when using a GET variable, ie. taking out "?id=" in the url and showing just the value? I have seen other people using this but I have no idea how to use it myself, Thanks in advance |
Re: PHP hiding the variable type but showing the value. They use HTACCESS to get the variable in the URL and silently send you to the PHP page, with that variable in the URL. User goes to example.com/example HTACCESS takes the example variable and puts it into a GET variable like example.com/?id=example HTACCESS silently redirects the page to the PHP script |
Re: PHP hiding the variable type but showing the value. ok, i'll look into it, thanks for your reply |
Re: PHP hiding the variable type but showing the value. It called mod rewrite. You put rules into your .htaccess file and Apache will "rewrite" the pretty url to the correct url. |
Re: PHP hiding the variable type but showing the value. .htaccess is the way to go. You could also look into using an mvc framework like CodeIgniter, CakePHP or Recess. |
| All times are GMT -6. The time now is 11:19 PM. |