Chinaunix首页 | 论坛 | 博客
  • 博客访问: 90386
  • 博文数量: 33
  • 博客积分: 1088
  • 博客等级: 少尉
  • 技术积分: 365
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-30 13:59
文章分类

全部博文(33)

文章存档

2011年(18)

2010年(9)

2009年(6)

分类: 系统运维

2010-06-04 16:46:27

apache下的htaccess用来控制访问权限,今天遇一怪现象,某同事在他的根下放了个.htaccess,内容包括:
RewriteEngine on

RewriteRule ^([0-9]+)$ /profiles/?u=$1 [L]
RewriteRule ^([0-9]+)/$ /profiles/?u=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI}      !=/server-status
RewriteCond %{REQUEST_URI}      !=/server-info
RewriteCond %{REQUEST_METHOD}   !^OPTIONS$
RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteRule ^(services|job|advertise|ag|aquariumViewer|cinema|doubleclick|ea_admin|event|eyewonder|games|guilds|homes|internal|madadd|nda|newsroom|omg|popup|research|services|shindig|static|store|wap)/ 404.html
RewriteRule ^(buddylist.html|hotelfordogstest.html|launch.php|mallcoptest.html|reactivate.php|samp.html|test.php) 404.html

我们在测试代码时写了个test.php,内容就算phpinfo啦,htaccess没有把他转到404上去,浏览器却不断的提示下载test.php文件,虽然改了htaccess后,可以访问test.php,但不懂它为什么不转,却提示下载!这个有点意思,慢慢研究一下。
阅读(476) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~