Apache下实现域名301跳转
Posted on 二月 10th, 2009 in apache、php、mysql | 10 Comments »
准备把域名www.domain1.com 301跳转到www.domain2.com
在apache的域名配置文件(虚拟主机配置文件中),比如目录:/etc/httpd/conf.d/ 目录下的abc.conf是配置文件。
打开此文件
在其中设置:
<VirtualHost *:80>
ServerName www.domain1.com
RedirectMatch Permanent ^/(.*) http://www.domain2.com/$1
</VirtualHost>
保存后重起apache服务器即可。
Leave a Reply
You must be logged in to post a comment.
10 Responses
QuianaBagbonac Watch Football AmbroceEihekmann cherikynkemanci Brigibabahekez ekceyArreoka
borceyWincon Watch Live NFL Football RociaBarzo Granvikkeabba myrziezarkezon OkiviaHuebch
That was intriguing . I admire your quality that you put into your writing . Please do continue with more like this.
ariBurkey Watch Live NFL Football zyronzeemer HumberzoReinec BrieRibgkey cammieHikken
I was just talking with my friend about this last week at the resturant. Don’t remember how we landed on the topic really, they brought it up. I do recall eating a wonderful fruit salad with ranch on it. I digress…
Thanks for some good points there. I am kind of new to web surfing, so I printed this off to put in my file, any better way to go about keeping track of it then printing?
Hey man , thanks for writing but this post isn’t vewable when using Chrome it is doubled up.
Grande alberino! Ringraziamenti per richiedere tempo scrivere qualcosa che sia realmente degno lettura. Trovo troppo spesso l’Info inutile e non qualcosa che sia realmente relativo. Ringraziamenti per i vostri duri lavori.
So not really on the same topic as your post, but I found this today and I just can’t resist sharing. Mrs. Agathe’s dishwasher quit working so she called a repairman. Since she had to go to work the next day, she told him, “I’ll leave the key under the mat. Fix the dishwasher, leave the bill on the counter, and I’ll mail you the check. Oh, and by the way…don’t worry about my Doberman. He won’t bother you. But, whatever you do, do NOT under ANY circumstances talk to my parrot!” When the repairman arrived at Mrs. Agathe’s apartment the next day, he discovered the biggest and meanest looking Doberman he had ever seen. But just as she had said, the dog simply laid there on the carpet, watching the repairman go about his business. However, the whole time the parrot drove him nuts with his incessant cursing, yelling and name-calling. Finally the repairman couldn’t contain himself any longer and yelled, “Shut up, you stupid ugly bird!” To which the parrot replied, “Get him, Spike!”
Fantastic webpage! I am loving it!! Will come back again – taking you for the feeds also, Thanks.