-4
Would you like to take the value that comes after the bar without using the ? ( query )
Example ( of how it is ) : https://foo.com/teste.php?p=acme
As I wish : https://foo.com/acme
I can already capture the value but I need to use the question mark. https://foo.com/? Acme
Wouldn’t you like to use the ? ( question mark )
I’m using the PHP_URL_QUERY
– Mr Magoo
What comes.... in the request? OR in any URL? The two Urls you have placed are completely different, so you could better describe what you want to do?
– Woss
Hello ! I would like to take the value of the example request https://foo.com/acme "Acme" is the value I would like to capture. Thank you !
– Mr Magoo
Tried to
PHP_URL_PATH
?– Woss
Yes tried but using PHP_URL_PATH it just shows the folder name :(
– Mr Magoo
No, it will be
/acme
, what you want (https://ideone.com/6Bklm0)– Woss
Yes, I need to get the "Acme" but my code only works if I use it as follows: "https://foo.com/? Acme" I would like to use "https://foo.com/acme" without using the question mark. I get the result using : $url = $_SERVER['REQUEST_URI']; echo parse_url($url, PHP_URL_PATH);
– Mr Magoo
It got a little confused what you want, because using PHP_URL_QUERY would return to you "/Acme", that would not be your goal ?
– Gabriel Branger
Yes this is my goal, however nay I wish to use question mark. https://foo.com/**? **Acme
– Mr Magoo
I’m still confused. I can’t decode if you want to use
parse_url
or if you want to rewrite the URL with . HTACCES https://answall.com/questions/71447/howto modify– Augusto Vasques
So that’s exactly what I’ve been through. It’s pretty confusing what you’re doing, so I voted to close the question as not clear enough.
– Woss
Let’s go ... https://www.instagram.com/nome.do.usuario How I get the "name.do.user." ?
– Mr Magoo
That’s it right there ideone.com/dTjEK1(<--- This here is a link to an example, click on this link) you’re trying to do?
– Augusto Vasques