我所有的完整網站頁面位於文件夾public_html
之下,其中包含index.php
和文件夾m
,其中包含所有移動網站頁面。 index.php
是這樣的:在手機站點和完整站點之間切換
<?php
if (...mobile client) {
header('Location: m/');
} else {
include 'front.html.php';
}
?>
也有在m
的index.php
,只是'包括 'front.html'。
該腳本可以檢測用戶的客戶端並自動指向完整站點和移動站點。
但現在我想要在移動網站上的鏈接切換到完整網站。如果它與<a href="../front.html.php">switch to full site</a>
一樣,地址欄中將會有front.html.php
,我不希望這樣。但是,如果它與<a href="../">switch to full site</a>
一樣,則會再次檢測並返回到移動站點。
如何處理?
只是兩者之間不同的設計設置會話變量版本? – Sedz