码迷,mamicode.com
首页 > Windows程序 > 详细

[moka同学笔记]window下.htacess文件 与linux下.htacess文件

时间:2016-11-02 20:48:01      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:turn   direct   writer   window下   cat   windows   cond   index   rom   

windows下

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

# Protect hidden files from being viewed
<Files .*>
    Order Deny,Allow
    Deny From All
</Files>

# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
#linux
#RewriteRule .* index.php/$0 [PT]
#wodows
RewriteRule ^(.*)$ /index.php?/$1 [L]

linux下

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

# Protect hidden files from being viewed
<Files .*>
        Order Deny,Allow
        Deny From All
</Files>

# Protect application and system files from being viewed
#RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]

 

[moka同学笔记]window下.htacess文件 与linux下.htacess文件

标签:turn   direct   writer   window下   cat   windows   cond   index   rom   

原文地址:http://www.cnblogs.com/hsd1727728211/p/6024016.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!