為什麼我們要做S E喔?當一個網站剛架好時,一定會沒有什麼流量;就跟一家新開的店想如果你沒有明確做好你想要買什麼的話你的店就會雜亂無章,這樣流量少自然轉換率就不高,您的銷售額自然也不會高,網站也是一樣的道理。
那我們要如何做S E O呢?這個當然就交給專業的團隊了。真正的S E U是非常複雜的,他關乎到不同搜尋引擎對文章或網站收入的規則,這個通常是需要長期培養,當我們能在短時間讓您交給我們做的網站,完成在一定關鍵字內排在首頁
1. 禁止訪問某些文件/目錄
增加Files選項來控制,比如要不允許訪問 .inc 擴展名的文件,保護php類庫:
<Files ~ ".inc$">
Order allow,deny
Deny from all
</Files>
禁止訪問某些指定的目錄:(可以用 <DirectoryMatch> 來進行正則匹配)
<Directory ~ "^/var/www/(.+/)*[0-9]{3}">
Order allow,deny
Deny from all
</Directory>
通過文件匹配來進行禁止,比如禁止所有針對圖片的訪問:
<FilesMatch .(?i:gif|jpe?g|png)$>
Order allow,deny
Deny from all
</FilesMatch>
針對URL相對路徑的禁止訪問:
<Location /dir/>
Order allow,deny
Deny from all
</Location>
配置示例:
<Directory "E:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
# 就是這一行,只去掉indexes也可
#Options Indexes FollowSymLinks
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
建議默認情況下,設置APACHE禁止用戶瀏覽目錄內容。