Home  >  Article  >  Backend Development  >  PHP 在地址栏里乱输入,导致CSS样式失效.怎么让跳转到指定页面

PHP 在地址栏里乱输入,导致CSS样式失效.怎么让跳转到指定页面

WBOY
WBOYOriginal
2016-06-13 12:49:11913browse

PHP 在地址栏里乱输入,导致CSS样式失效.如何让跳转到指定页面
例:www.test.com/test.php 如果我在地址栏里乱输入,www.test.com/test.php /sdfsdf/klklj 结果导致 test.php CSS样式失效.请高手指点,当输入这些不存在页,如何跳转到一个错误处理页,如www.test.com/error.php 


------解决方案--------------------
伪静态,不符合规范的url可跳到自定义404页面
不知你说的csssu样式失效是何意啊
难道页面其他数据正常显示吗
------解决方案--------------------
采用相对根目录的路径或者绝对路径引用css
------解决方案--------------------
引用:
采用相对根目录的路径或者绝对路径引用css

+1
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn