wxyfj 发表于 2017-1-8 06:02:07

apache 我的主要的.htaccess文件

版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出版、作者信息和本声明。否则将追究法律责任。http://blog.csdn.net/mayongzhan - 马永占,myz,mayongzhan


###重写开关
RewriteEngine on
###RewriteRule ! 反转,不匹配
###RewriteRule \ 转义
###RewriteRule . 表示单个任意字符,如果要使用.则需要使用转义: \. 表示 .
###RewriteRule (|) 表示或
###RewriteRule $表示以什么什么结尾: aaaa$ 以 aaaa为结尾
###RewriteRule abc index.php 表示把abc转向index.php
###RewriteRule *表示一个或多个前面的东西
RewriteRule \.* index.php
#RewriteRule !\.(|ico|gif|jpg|jpeg|bmp|png|psd|swf|rar|zip|js|css)$ index.php
###默认禁止全部访问,除了允许的
#Order Deny,Allow
###禁止所有
#Deny from all
###允许部分
#Allow from xxx
###错误转向, 相对于DocumentRoot
#ErrorDocument 404 /index.php

###以下内容需要mod_php, 在php.ini中以下有相关定义
#php_flag magic_quotes_gpc off
#php_flag register_globals off
#php_value include_path "/path/to/lib"
页: [1]
查看完整版本: apache 我的主要的.htaccess文件