linux 耳机设备文件,linux耳机
Re:我現(xiàn)在有一個(gè)網(wǎng)站我想把bbs.xxx.com解析到www.xxx.com的耳機(jī)目錄,我要怎 & ..
經(jīng)常會(huì)碰到這樣的情況,其他網(wǎng)站鏈接你的站點(diǎn)時(shí),會(huì)用下面的鏈接:
www.example.comexample.com/www.example.com/index.htmlexample.com/index.php
而這樣導(dǎo)致:你站點(diǎn)主域名的pr值分散到其他幾個(gè)URLs了。
如果你用301重定向把其他三個(gè)URL轉(zhuǎn)到www.example.com PR也就集中在主域名:www.example.com 了。301重定向具體辦法:
設(shè)置.htaccess文件(只適用于linux系統(tǒng),并需要虛擬主機(jī)支持。)
使訪(fǎng)問(wèn)example.com/的時(shí)候就會(huì)自動(dòng)轉(zhuǎn)到www.example.com 在.htaccess文件里寫(xiě)上以下代碼即可。RewriteEngine onRewriteCond %{http_host} ^mydomain.com [NC]RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]
注意:URL標(biāo)準(zhǔn)化的301重定向(以上代碼)需要寫(xiě)在其他URL-rewrite代碼之前。
下面給你一個(gè)別的網(wǎng)站的.htaceess文件設(shè)置,你可以參考下
### if you want to use mod_rewrite, set this 'On'RewriteEngine On# the path to your site installationRewriteBase /# Maintenance Section - Uncomment the lines below according to your need# Write below your client IP address (e.g.: 127.0.0.1)# if you need to keep your web access during maintenance#RewriteCond %{REMOTE_ADDR}??????????!^127.0.0.1$# Choose your way of closing the access to PMF:# a. you can simply forbid access (HTTP 403 Error)#RewriteRule ^(.*)$??????????????????underMaintenance.htm [F,L]# b. return the user an explanation#RewriteRule ^(.*)$??????????????????underMaintenance.htm [L]# url canonicalizationRewriteCond %{http_host} ^seowhy.com [NC]RewriteRule ^(.*)$ http://www.seowhy.com/$1 [L,R=301]# show all categoriesRewriteCond %{REQUEST_URI}??????????showcat\.html$ [NC]RewriteRule ^(.*)$??????????????????index.php?action=show [L,QSA]# the search pageRewriteCond %{REQUEST_URI}??????????search\.html$ [NC]RewriteRule ^(.*)$??????????????????index.php?action=search [L,QSA]# the add content pageRewriteCond %{REQUEST_URI}??????????addcontent\.html$ [NC]RewriteRule ^(.*)$??????????????????index.php?action=add [L,QSA]# the ask question pageRewriteCond %{REQUEST_URI}??????????ask\.html$ [NC]RewriteRule ^(.*)$??????????????????index.php?action=ask [L,QSA]# the open questions pageRewriteCond %{REQUEST_URI}??????????open\.html$ [NC]RewriteRule ^(.*)$??????????????????index.php?action=open [L,QSA]# the help pageRewriteCond %{REQUEST_URI}??????????help\.html$ [NC]RewriteRule ^(.*)$??????????????????index.php?action=help [L,QSA]# the contact pageRewriteCond %{REQUEST_URI}??????????contact\.html$ [NC]RewriteRule ^(.*)$??????????????????index.php?action=contact [L,QSA]# a page with a recordRewriteCond %{REQUEST_URI}??????????([0-9]+)_([0-9]+)_([a-z\-]+)\.html$ [NC]RewriteRule ^(.*)_(.*)_(.*)\.html$??index.php?action=artikel&cat=$1&id=$2&artlang=$3 [L,QSA]# a category pageRewriteCond %{REQUEST_URI}??????????????category([0-9]+)\.html$ [NC]RewriteRule ^category(.*)\.html$????????index.php?action=show&cat=$1 [L,QSA]# a category page with page countRewriteCond %{REQUEST_URI}??????????????category([0-9]+)_([0-9]+)\.html$ [NC]RewriteRule ^category(.*)_(.*)\.html$?? index.php?action=show&cat=$1&seite=$2 [L,QSA]# start pageRewriteRule index.html$ index.php [PT]# sitemapRewriteCond %{REQUEST_URI}??????????????sitemap-([a-zA-Z0-9漩周遌*)_([a-z\-]+)\.html$ [NC]RewriteRule ^sitemap-(.*)_(.*)\.html$?? index.php?action=sitemap&letter=$1&lang=$2 [L,QSA]# a solution id pageRewriteCond %{REQUEST_URI}??????????????solution_id_([0-9]+)\.html$ [NC]RewriteRule ^solution_id_(.*)\.html$????index.php?solution_id=$1 [L,QSA]# 404 pageErrorDocument 404 /404.html
-------------------------
是我理解錯(cuò),樓主的意思了,元芳回答的操作正確
總結(jié)
以上是生活随笔為你收集整理的linux 耳机设备文件,linux耳机的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: centos7 访问php 该网页无法正
- 下一篇: android 指纹拍照,一加2评测:增