How to make ngix virtual directories accessible in php?

hi

Let's say I have a web server (nginx) server.com where I have only one php file index.php (there is no directory structure). I want to be able to access anything after server.com. It will be an url structure. For example server.com/google.com, server.com/yahoo.com.au etc…

Q1: How can I access whatever is afer server.com in my index.php?

Q2: Can I even get protocol from such url? For example server.com/http://www.google.com or server.com/https://www.google.com

any ideas?

Thank you

R

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct