Ubuntu 11.04 + Apache2 配置域名绑定及rewrite



首先cd /etc/apache2/mods-enabled ,新建一个rewrite.load,文件内容如下:

LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

修改 /etc/apache2/sites-availabe/default

把所有的AllowOverride None 修改为All




修改  /etc/apache2/sites-availabe/default 增加标红部分

<VirtualHost *:80>

        ServerAdmin webmaster@localhost

        ServerName  www.stonenotes.me


域名跳转  实现stonenotes.mewww.stonenotes.me跳转

修改  /etc/apache2/sites-availabe/default 增加如下部分

<VirtualHost *:80>

ServerName stonenotes.me

RewriteEngine on

RewriteRule ^(.*)$ http://www.stonenotes.me$1 [R=301,L]


《Ubuntu 11.04 + Apache2 配置域名绑定及rewrite》上有10条评论

  1. There are currently 119 or so I-A teams. Every team plays a 6 game regular season of whichever teams they want-all traditional conference opponents, all lousy teams, all whatever. After the 6 game regular season, randomly-drawn teams receive first round byes, while the top 32 teams are seeded and the rest are drawn randomly. The 7 round playoff then begins, with teams alternating home and away games (if team A has played 2 home games and team B 1 home game, team B hosts; if equal, higher seeded team hosts; if equal and no seeded team, coin flip). Teams also participate in a losers bracket, except for the final 3 games, which are held at 3 of the 4 BCS bowl sites, rotating on a year-to-year basis. Other bowl games are allowed to exist, and may chose whichever teams they wish, except the 4th BCS bowl site has first rights to the teams that lose in the national semifinals.