vendredi 7 décembre 2018

How to change url php parameter to subdomain and as a variable

i want to do it but i don't know how to, i've tried a lots of tutorials but doesn't work for me.

I have a website (PHP), that show several info depending of a parameter on URL (i interpret it with php) like this:

example.com/about.php?some=1

i want to change the URL to:

some.example.com/about.php

and get the subdomain name (some) and use it as a PHP variable.

Important: i should use this function on all my website (as a $_SESSION variable but through URL)




Aucun commentaire:

Enregistrer un commentaire