Record the domain name and static link codeigniter just created using mod_rewrite.
Solution
1. Check your apache2/bin/httpd l
Is there mod_rewrite.so?
If not, recompile withrewrite.
2. Add the load module in httpd. conf (check the syntax by yourself)
When you restart apache, if any in build occurs, it indicates that the module has been compiled to apache and does not need to be loaded. Remove the line httpd. conf.
3. Open your conf/extra/httpdvhosts. conf
Find your VM. This is my configuration file.
I need to split the seven channels. Note that the Host header is not regular. +? Match, this will kill your img.domain.com, so be careful.
ServerAdmin [url = Response
DocumentRoot "/data0/wwwroot/www2.domain.com /"
ServerName [url = http://www.domian.com/?chain mark 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 disguise [url = ingress as [url = http://game.domain.com/?chain mark http://game.domain.com#/url]
[Url = response => [url = Response
Note apache2/bin/apachectl restart
[]
D8888D reply content
The key is url RegEx matching. [Img] http://www.phpchina.com/bbs/images/smilies/default/biggrin.gif#/img]
D8888D reply content
I think you should point to a second-level domain name.
If you apply the application to a link for each member, this experiment is understandable. I think apache has increased a lot of load.