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>
  • 相关阅读:
    django 设置局域网内访问项目
    104. Maximum Depth of Binary Tree
    multi dimension array
    Longest Plindrome Subarray
    BlockQueue
    H2O
    HoppingIterator
    midStack
    Reverse Words in a String II
    public boolean canPlaceFlowers(List<Boolean> flowerbed, int numberToPlace)
  • 原文地址:https://www.cnblogs.com/whm-blog/p/7985204.html
Copyright © 2011-2022 走看看