簡體   English   中英

將所有請求重定向到單個文件,並通過htaccess和php獲取請求的數據

[英]redirect all request to single file and fetch the requested data via htaccess and php

我想知道如何通過php和.htaccess獲取所有請求的鏈接

基本上,我希望所有請求(實際上不作為文件存在)都將定向到index.php

從index.php中,我將回顯顯示的請求。

所以哇

https://puaction.com/nonexistedpage.php

將會去 :

https://puaction.com/404.php

並在404.php上

<?php

$reqpage = /* fetch from htaccess */

echo 'the page : '.$reqpage.' that you requested is not exists';

?>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM