新手求助!如何实现PC与WAP端网址的同步伪静态?

Lordhl 2018-03-27 09:55:16
标题可能描述得不是很清楚,其实是想要把手机版网站的域名后缀隐藏,也就是wap.php.
PC版网站的后缀index.php已经隐藏,服务器环境是iis8.0,是通过新建web.config实现的。

目前代码如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>
<defaultDocument>
<files>
<clear />
<add value="index.asp" />
<add value="index.aspx" />
<add value="index.php" />
<add value="index.html" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="Default.aspx" />
<add value="index.shtml" />
</files>
</defaultDocument>
</system.webServer>
</configuration>


求问如果想隐藏wap.php,怎么插入代码?
...全文
816 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧