我在本地xampp自定义我的网站但由于htaccess没有显示网站文件夹

时间:2018-02-01 08:05:12

标签: php .htaccess

我把我的网站数据文件夹放在本地xampp但文件夹没有显示到我的本地xampp文件夹由于htaccess .....我尝试但我无法显示文件夹,也没有在本地打开我的网站........我该怎么办。这是我的htaccess文件会发生什么变化

Options All -Indexes
AddDefaultCharset utf-8


Options +FollowSymlinks
RewriteEngine on
RewriteBase /

RewriteRule ^robots\.txt$ robots.%{HTTP_HOST}.txt [NC,QSA,L]
RewriteRule ^(Admin) - [NC,QSA,L]
RewriteRule ^([^/\.]+)/?$ index.php?lang=$1 [NC,QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ index.php?lang=$1&page=$2 [NC,QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ index.php?lang=$1&page=$2&one=$3 [NC,QSA,L]
RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ index.php?lang=$1&page=$2&one=$3&two=$4 [NC,QSA,L]

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/opentype

  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

<files *.html>
    SetOutputFilter DEFLATE
</files>

<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf)$">
    <IfModule mod_expires.c>
        ExpiresActive on
        ExpiresDefault "access plus 30 days"
    </IfModule>
    Header unset ETag
    FileETag None
</FilesMatch>

ExpiresActive On
ExpiresByType image/jpeg "modification plus 1 minutes"
ExpiresByType image/png "modification plus 1 minutes"
ExpiresByType application/x-font-woff "access plus 1 years"
ExpiresByType text/css "modification plus 1 seconds"
ExpiresByType application/javascript "modification plus 1 seconds"
ExpiresDefault "access plus 1 minutes"

1 个答案:

答案 0 :(得分:0)

显示文件夹需要选项+Indexes

删除-Indexes并添加:

Options +Indexes