Let say we have link as following
for link as ****.com/index.php?id=4
the <?=$id?> is 4
for link as ****.com/4
the <?=$id?> is 4
for link as ****.com/4-keyowrd-keyword
$realid = array_shift(explode("-", $id));
so <?=$realid?> is 4
Now my question is for link as ****.com/4/keyword-keyword
How then get the id as 4 is there any way to do it ?
Thanks
If you actually have a complete URL with the scheme included (i.e.: http://something.com and not just something.com), you can do:
If you don’t the scheme there, you can just prepend it, like: