Apache 伪静态处理跳转中传递参数

下面对比一下,看第一个配置文件#将RewriteEngine模式打开RewriteEngineOnRewriteBase/RewriteCond%{HTTP_HOST}^m.zcyy.dev[NC]RewriteRule^(/)?$/wap.php?%{QUERY_STRING}[L]#获取后面跟随的参数RewriteCond%{HTTP_HOST}^m.zcyy.dev[NC]RewriteRule^/(\w+).php$/$1.php?%{QUERY_STRING}[L]#获取后面跟随的参数RewriteCond%{HTTP_HOST}^m.zcyy.dev[NC]RewriteRule^(\w+).html$/wap.php?controller=$1&%{QUERY_STRING}[L]#获取后面跟随的参数RewriteCond%{HTTP_HOST}^m.zcyy.dev[NC]RewriteRule^(\w+)\/(\w+).html$/wap.php?controller=$1&action=$2&%{QUERY_STRING}[L]#获取后面跟随的参数RewriteCond%{HTTP_HOST}^m.zcyy.dev[NC]RewriteRule^(\w+)\/(\w+)\/([\w\-\=\&\/a-zA-Z0-9_%]+).html$/wap...

Apache 域名跳转

如果想要实现访问jingguan.365use.com时,跳转到http://www.landscapemedia.cn,可以做如下操作<VirtualHost*:80>ServerNamejingguan.365use.comRewriteEngineonRewriteCond%{HTTP_HOST}^jingguan.365use.com[NC]RewriteRule^(.*)http://www.landscapemedia.cn$1[R=permanent,L]</VirtualHost>

Apache 伪静态 多域名配置 目录指向

Apache伪静态多域名配置目录指向第一步:域名绑定<VirtualHost*:80>DocumentRoot"D:\wwwroot\xinfushi"ServerNamewoying.365use.comServerAliasm.woyingcaifu.com.cnm.woyingcaifu.cnm.woyingcaifu.comm.woyingwm.com.cnm.woyingwm.cnm.woyingwm.comwoyingcaifu.com.cnwoyingcaifu.cnwoyingcaifu.comwoyingwm.com.cnwoyingwm.cnwoyingwm.comwww.woyingcaifu.com.cnwww.woyingcaifu.cnwww.woyingcaifu.comwww.woyingwm.com.cnwww.woyingwm.cnwww.woyingwm.com<Directory"D:/wwwroot/xinfushi">Op...

PHP 判断是否为Get/Post/Ajax提交

PHP判断是否为Get/Post/Ajax提交/***是否是AJAx提交的*@returnbool*/functionisAjax(){if(isset($_SERVER['HTTP_X_REQUESTED_WITH'])&&strtolower($_SERVER['HTTP_X_REQUESTED_WITH'])=='xmlhttprequest'){returntrue;}else{returnfalse;}}/***是否是GET提交的*/functionisGet(){return$_SERVER['REQUEST_METHOD']=='GET'?true:false;}/***是否是POST提交*&...

Apache 之 Ubuntu下启动/重启/停止apache服务器

一直不想使用Apache,因为我周边的人觉得不好,我也觉得既然别人说的不好,也就没有尝试的必要,但是由于其普遍性,在帮别人做项目的时候,还是需要使用一下的Apache的,这里简单的记录一下,Apache的启动和停止的命令操作。Task:StartApache2Server/启动apache服务#/etc/init.d/apache2startor$sudo/etc/init.d/apache2startTask:RestartApache2Server/重启apache服务#/etc/init.d/apache2restartor$sudo/etc/init.d/apache2restartTask:StopApache2Server/停止apache服务#/etc/init.d/apache2stopor$sudo/etc/init.d/apache2stop参考文章:http://bbs.phpchina.com/home.php?mod=space&uid=3950&do=blog&id=48934