服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. .htaccess apache 2.2 redirect
  3. 301从www.example.com/thisredirect到.example.com
Intereting Posts
SVN自定义403错误信息 在Debian上禁用Xserver自动启动 FreeBSD 4.7缺lessIPFW – 我该如何安装? 在Windows Server 2008 FTP设置中缺less一个步骤 MySQL相当于.pgpass,或者在mySQL的cron作业中进行自动authentication Windows 8 IE 10 TLS握手到CentOS 6.6上Apache 2.2的错误 IIS7和SSL证书 使用Robocopy复制随机文件 哪个环境variables包含… 上游如何在nginx(memcached_pa​​ss)中工作? 如何将Oracle数据库安装到新实例? net-snmp将默认端口161更改为其他内容 Apache + PHP:100ms启动脚本? 通过子域的通配符SSL协商 为什么crond监听端口6550 / tcp(fg-sysupdate)?

301从www.example.com/thisredirect到.example.com

我想将www.example.com/this/或example.com/this/redirect到.example.com

目前在我的.htaccess文件中,我有:

RewriteEngine on RewriteCond ${HTTP_HOST} ^(www\.)?example\.com/this$ RewriteRule ^(.*) http://that.example.com/$1 [R=301,L] 

然而,这不适合我。

  • 在一个SSI中,包含的文件是否可以被redirect到.htaccess文件中
  • Apache拒绝直接访问exception
  • Apacheurl将`-`改写为`_`
  • .htaccess安assembly置
  • 有条件的包括.htaccess文件

  • Apache服务器上的目录redirect
  • 在.htaccess中找不到文件
  • htaccess重写引导斜杠
  • 允许访问joomla页面的ip的'拒绝'
  • 根只使用.htaccessredirect

Apache的mod_alias redirect更简单,你可以尝试这样的事情:

 Redirect /this http://that.example.com/ 

%HTTP_HOST只会匹配主机名(www.example.com)。 您还需要在%REQUEST_URI上匹配,然后使用它插入到规则中

 RewriteCond %{REQUEST_URI} !^/(.*)$ 
  • 用querystrings路由子域
  • 使用utf-8字符的.htaccess
  • 理解.htacces文件中的RewriteCond
  • 没有findhtaccess
  • Apache从网上隐藏特定的文件types
  • configuration.htaccess来阻止僵尸索引,但允许浏览器目录列表/查看
  • 如何从查询string的URL中间删除一个斜杠?
  • 如何通过htaccess只将根页面redirect到另一个子域名?
  • 为什么我的mod_rewriteredirect仅适用于请求的页面,而不是必要的CSS,JS文件?
  • 限制未列入白名单的IP查看Apache中的目录列表

  • © 2017 服务器 Gind.cn
  • Topics
  •        
  • Powered by Server
  • Privacy Policy