Hi guys I’ve been working with $_GET['whatever'] now this time I need something that I’ve never had done before I’ve seen this url domain.com/author/name_of_user and my question is how do I get data in that kind of URL? I’ve been looking for answers and all they say is $_GET[''];
so example I have this link http://localhost/domain/attachments.php
how do I change this one to http://localhost/domain/attachments/ in the first place? and how will I be able to get data from that is it from $_GET['']? please help me I’m really confused
Hi guys I’ve been working with $_GET[‘whatever’] now this time I need something that
Share
That is called URL rewrite:
http://httpd.apache.org/docs/2.2/rewrite/
http://www.iis.net/downloads/microsoft/url-rewrite
Those are links to url rewritting in Apache / IIS.
In short, it takes:
http://localhost/domain/attachments.phpand “transform” (or rewrite) it tohttp://localhost/domain/attachments(or whatever you prefer).Normally it is used to improve SEO.
You can still use $_GET normally because it’s just a transformation, in the end you still have whatever.php?var=value&…. only that it shows differently for the browser.