Make a note of the domain name and static link that you just made with mod_rewrite CodeIgniter
Workaround
1. Look at your apache2/bin/httpd l
Is there mod_rewrite.so in there?
If not, recompile withrewrite
2.httpd.conf Add load module (grammar self-check)
When you restart Apache, when in build, it means that the module has been compiled into Apache, it does not need to be loaded, remove the line just now httpd.conf
3. Open your conf/extra/httpdvhosts.conf
Find your virtual host, this is my profile
I need to divide 7 channels, note that the host header is not. +? Match, this will kill your img.domain.com, so be cautious.
ServerAdmin [url=http://www.phpchina.com/bbs/mailto:www@domain.com] link marker Www@domain.com[/url]
DocumentRoot "/data0/wwwroot/www2.domain.com/"
ServerName [url=http://www.domian.com/] link marker Www.domian.com[/url]
Serveralias game.domain.com soft.domain.com video.domain.com theme.domain.com ebook.domain.com pic.domain.com Audio.domain
I.Com domain.com
Errorlog "|/usr/local/sbin/cronolog/data1/logs/httpd/www2/error_log.%y%m%d"
Customlog "|/usr/local/sbin/cronolog/data1/logs/httpd/www2/access_log.%y%m%d" combined
Rewriteengine on
Rewritecond%{http_host} ^ (game|soft|video|theme|pic|audio|ebook). domain.com$
Rewriterule ^ (. +)%{http_host}$1 [C]
Rewriterule ^ (game|soft|video|theme|pic|audio|ebook). domain.com (/*) $/index.php/$1
Rewriterule ^ (game|soft|video|theme|pic|audio|ebook). domain.com/(Lists|detail)/(. *?). html$/index.php/$1/$2/$3
The above configuration, can help me to [url=http://www.domain.com/index.php/game] link tag Http://www.domain.com/index.php/game[/url] disguised as [url=http ://game.domain.com/] link marker Http://game.domain.com[/url]
[url=http://game.domain.com/lists/2/40.html] link mark http://game.domain.com/lists/2/40.html[/url] = [url=http:// WWW.DOMAIN.COM/INDEX.PHP/GAME/LISTS/2/40] link marker Http://www.domain.com/index.php/game/lists/2/40[/url]
Note Apache2/bin/apachectl restart
[ ]
d8888d Huitie Content
The key is URL regular matching. [Img]http://www.phpchina.com/bbs/images/smilies/default/biggrin.gif[/img]
d8888d Huitie Content
I think that you might as well build a two-level domain point.
If it is applied to a member each link, so the experiment is understandable. I think it's a lot more load on Apache.
http://www.bkjia.com/PHPjc/632531.html www.bkjia.com true http://www.bkjia.com/PHPjc/632531.html techarticle make a note of the domain name you just used mod_rewrite and the static link CodeIgniter workaround 1. See if there is any mod_rewrite.so in your apache2/bin/httpd L. Re-compile ...