.htaccess重定向和url重写加密验证的几个例子

ADMIN .htaccess , 重定向 , url重写 2017-03-13 1472 次浏览
 .htaccess是apache虚拟目录中一个可以用来代替apache中conf中的一些功能了,像重定向和url重写或安全配置都可以利用它来完在下面来看看一些关于.htaccess例子。# 这是注释 # 指定默认首页查找顺序 DirectoryIndex index.htm .index.php #自定义404页面 ErrorDocument 404 /error/404.html #比较下面2句: 默认是302,用户访问的是abc,但实际显示的是def页面,地址栏也还是显示abc redirect /abc /def #redirect 301 /abc /def RewriteEngine on RewiteBase&nbs [...]