您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

.htaccess

2024/10/26 13:40:13发布45次查看
项目里面有.htaccess文件
代码
adddefaultcharset utf-8 rewriteengine onrewriterule !admin2s|\.(js|ico|gif|jpg|png|css|swf|html|php|pdf|xls)$ index.php
这个是用来做什么的?
回复讨论(解决方案) url重写,定义规则的
url重写,定义规则的
我在控制台没看到没看到跳转后处理的信息
adddefaultcharset utf-8  总是发出 utf-8 头信息
rewriteengine on  开启 url 重写
rewriterule !admin2s|\.(js|ico|gif|jpg|png|css|swf|html|php|pdf|xls)$ index.php  url 重写规则
url 重写规则是:
除了目录 admin2s 和 图片文件外的所有请求都交由 index.php 处理
adddefaultcharset utf-8  总是发出 utf-8 头信息
rewriteengine on  开启 url 重写
rewriterule !admin2s|\.(js|ico|gif|jpg|png|css|swf|html|php|pdf|xls)$ index.php  url 重写规则
url 重写规则是:
除了目录 admin2s 和 图片文件外的所有请求都交由 index.php 处理
如果我访问的页面不存在,则交给xxx.php处理,这个规则要怎么书写?
adddefaultcharset utf-8  总是发出 utf-8 头信息
rewriteengine on  开启 url 重写
rewriterule !admin2s|\.(js|ico|gif|jpg|png|css|swf|html|php|pdf|xls)$ index.php  url 重写规则
url 重写规则是:
除了目录 admin2s 和 图片文件外的所有请求都交由 index.php 处理
如果我访问的页面不存在,则交给xxx.php处理,这个规则要怎么书写?
在.htaccess里加入这一行就行了
errordocument 404 /xxx.php xxx.php一定要放在网站根目录
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product