我在WebServer上具有此结构:
\main
index.php
index.php
文件可通过www.myurl.com/main/
访问。
现在,我想将具有子文件夹结构(不存在的文件夹)的每个查询重定向到我的index.php
文件,并传递输入的URL。
赞:
www.myurl.com/main/world/fish
www.myurl.com/main/hasuisdg
www.myurl.com/main/bowl/soup
www.myurl.com/main/salat
所有这些URL都应在传递URL时由我的index.php回答。
一般示例:
index.php
的代码:
<?php
echo passedurl(); //this is the function i am looking for
?>
在浏览器中输入www.myurl.com/main/ilikestackoverflow
。在网页上显示www.myurl.com/main/ilikestackoverflow。
并非绝对重要:网址更改为www.myurl.com/main/
。
谢谢:)