zoukankan      html  css  js  c++  java
  • apache htaccess 一个 例子

    <Files ~ "^.(htaccess|htpasswd)$">
    deny from all
    </Files>
    
    DirectoryIndex index.html   
    #Redirect permanent /index.html http://www.bcet.com.cn/index.html 
    #Redirect permanent /admin.html http://www.bcet.com.cn/zkdg/public/admin.html 
    #Redirect permanent /admin http://www.bcet.com.cn/zkdg/public/admin.html 
    #错误页面
    ErrorDocument 404 /htmlPage/404.html
    ErrorDocument 400 /htmlPage/404.html
    ErrorDocument 500 /htmlPage/404.html
    ErrorDocument 503 /htmlPage/404.html
    
    order deny,allow
    
    
    
    <IfModule mod_rewrite.c>
    RewriteEngine on 
    RewriteCond %{HTTP_HOST} ^(www.)?bcet.com.cn$ 
    RewriteRule ^(s*)$ /index.html [L] #L 代表匹配了此项后,停止匹配其他项

    #这里代表如果页面或者资源未找到 就去 /zkdg/public/目录寻找。 #RewriteCond %{REQUEST_URI} !^/zkdg/public/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ /zkdg/public/$1 #RewriteCond %{HTTP_HOST} ^(www.)?show.wordcms.cn$ #RewriteRule ^(/)?$ 目标目录名/index.php [L]
    </IfModule>
  • 相关阅读:
    Codeforces 938G(cdq分治+可撤销并查集+线性基)
    codeforces 938F(dp+高维前缀和)
    寒武纪camp Day6
    寒武纪camp Day5
    寒武纪camp Day4
    bzoj4161 (k^2logn求线性递推式)
    loj10003加工生产调度
    loj10002喷水装置
    loj10001种树
    bzoj1023
  • 原文地址:https://www.cnblogs.com/whm-blog/p/7985204.html
Copyright © 2011-2022 走看看