项目文件夹未显示在localhost项目列表中

时间:2013-12-02 07:39:46

标签: .htaccess

这里我要维护网站..我将网站的整个文件从服务器转移到localhost ..但是网站没有显示在localhost列表中... 可能是什么问题?这个问题是.htaccess ???我的.htaccess有..

#Options +FollowSymlinks
RewriteEngine On
Options -Indexes
#RewriteBase /
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

#Expire Header
<FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf)$">
ExpiresDefault "access plus 300 days"
</FilesMatch>

#Enable Compression
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript 

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。在您的Apache的httpd.conf中取消注释下面的行,然后重新启动Apache。

#LoadModule deflate_module modules/mod_deflate.so

或者,您可以更新.htaccess压缩部分,如下所示:

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    and so on...
</IfModule>