0
I work with url friendly.
All requests from my site, always goes through index.php
There, I wanted to take the full url that someone is ordering and write to a bank table.
As I have several different types of combinations (rules) in my htaccess
, can come urls like this:
www.site.com.br/news/111
www.site.com.br/produto/111
www.site.com.br/como-funciona/
www.site.com.br/news/carros/ford/11
That is, there is an infinite and extensive list of rules.
Can anyone help me in how via PHP take these url, and go recording in a table?
Try this: $domain= $_SERVER['HTTP_HOST']; $url = "http://" . $domain. $_SERVER['REQUEST_URI']; echo $url;
– Diego
Test and see if it fits. Put inside any page.
– Diego