【发布时间】:2011-12-11 01:35:16
【问题描述】:
我所有的完整网站页面都在文件夹public_html 下,其中包含index.php 和文件夹m,其中包含所有移动网站页面。 index.php是这样的:
<?php
if (...mobile client) {
header('Location: m/');
} else {
include 'front.html.php';
}
?>
在m 中还有一个index.php,只是`include 'front.html'。
此脚本可以检测用户的客户端并自动定向到完整站点和移动站点。
但现在我想要移动网站上的链接切换到完整网站。如果是<a href="../front.html.php">switch to full site</a>,地址栏中会有front.html.php,我不要这个。但是,如果是<a href="../">switch to full site</a>,它会再次检测并返回移动站点。
如何处理?
【问题讨论】:
-
只是两个版本的设计不同?