• apache配置


    <VirtualHost *:80>
        ServerAdmin webmaster@dummy-host2.example.com
        ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot "e:/www/WapSources/01 code"
        ServerName wap.weilan.com
        #ServerAlias www.dummy-host.example.com
        #ErrorLog "logs/dummy-host.example.com-error.log"
        #CustomLog "logs/dummy-host.example.com-access.log" common
        
        <Directory "e:/www/WapSources/01 code">
            Options Indexes FollowSymLinks
            AllowOverride all
            Order allow,deny
            Allow from all
        </Directory>
        <IfModule mod_rewrite.c>
            RewriteEngine on
            RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
            RewriteRule .* - [F]
            Rewriterule ^(.*)/(.*)/index.html$ $1/index.php?$2
            Rewriterule ^(.*)/(.*)/index(d+).html$ $1/index.php?$2&page=$3
            Rewriterule ^(.*)/(.*)/a(d+).html$ $1/index.php?$2/$3
            Rewriterule ^(.*)/u/(d+)/(.*)$ $1/index.php?u&$2&$3
            Rewriterule ^(.*)/u/(d+)/(.*)/$ $1/index.php?u&$2&$3
            Rewriterule ^(.*)/u/(d+)$ $1/index.php?u&$2
            Rewriterule ^(.*)/u/(d+)/$ $1/index.php?u&$2
            Rewriterule ^(.*)/(.*)/index.html?(.*) $1/index.php?$2&$3
            Rewriterule ^(.*)/(.*)/index(d+).html?(.*) $1/index.php?$2&$3
            Rewriterule ^(.*)/index.action(.*) $1/index.php$3
        </IfModule>
        
    </VirtualHost>

    简洁版:

    #指定自己的哪个网卡的哪个IP地址,可以访问虚拟主机
    NameVirtualHost *:80
    <VirtualHost *:80>
     #指定虚拟主机的域名
     ServerName yangzailu.com
     #指定虚拟目录
     DocumentRoot "e:/www/web1"
     #指定目录权限
     <Directory "e:/www/web1">
           Options Indexes FollowSymLinks
           AllowOverride All
           Order Deny,Allow
           Deny from all
           Allow from all
     </Directory>
    </VirtualHost>

  • 相关阅读:
    虚函数中的变量作用域问题
    C++技能重拾2
    C++技能重拾
    位运算取第一个非0的位 r & (~(r-1))
    ThoughtWorks微服务架构交流心得
    字符串匹配的sunday算法
    Codeforces Round #270(利用prim算法)
    HDFS建筑与shell操作
    Spark SQL 源代码分析系列
    HDU 4686 Arc of Dream(递归矩阵加速)
  • 原文地址:https://www.cnblogs.com/yangzailu/p/5821798.html
Copyright © 2020-2023  润新知