服务器 Gind.cn
  • Linux
  • Windows
  • Ubuntu
  1. 服务器 Gind.cn
  2. .htaccess apache 2.2 mod rewrite
  3. mod_rewrite捕获子域名
Intereting Posts
Powershell和NMAP信息共享 build议的256M和512M RAM服务器的MPM preforkconfiguration是什么? Postfix在local_recipient_maps中configuration<非UNIX帐户的数据库> xz压缩不可用 – 在centos yum错误 如何使用git和github在dev服务器上设置多个用户 Nagios vs Splunk AD服务器上的域用户权限有限 tcpdumpfilter,排除私人IPstream量 wwwredirect到非www(Windows Server) 为什么Dns.Resolve在我的C#应用​​程序在W2008R2需要x3? apache2和VirtualHost与外来字符和多个别名 时间服务器/ PDCangular色closures的域控制器不广告 select正确的服务器机架宽度 只有当我使用虚拟机的外部IP时,才会导致“不安全”的警告页面(但在其他方面工作正常) 我可以限制Windows 2003/2008/2008 R2中的用户带宽/内存使用率/ CPU使用率吗?

mod_rewrite捕获子域名

我想写一个重写scheme,以便:

  • user1.example.net将redirect到example.net/user/user1
  • user2.example.net将redirect到example.net/user/user2

这是我在我的.htaccess代码。 但它总是redirect到example.net 。

 RewriteCond %{http_host} ^[^.]+\.example\.net [NC] RewriteRule ^([^.]+)\.example\.net(.*) http://example.net/user/$1 [R=301,L] 

有人能告诉我我做错了什么吗?

  • htaccess – redirect超过1级深度不工作
  • CNAMEredirect到WordPress的博客不工作
  • .HTACCESS子域,而不是.CONF子域
  • .htaccess文件放置
  • 需要禁用vHost或.htaccess中的子子域

  • htaccess – 从domain.com/index.phpredirect到domain.com?
  • .htaccess身份validation内部服务器错误500
  • 似乎无法得到mod_rewrite设置环境variables
  • 使用.htaccess将用户从httpsredirect到http时遇到问题
  • 如何拒绝用户从特定目录读取* .jpg
 RewriteEngine on RewriteCond %{HTTP_HOST} ^(.*)\.example.com [NC] RewriteRule ^(.*)$ http://example.com/user/%1/$1 [R=301,L] 
  • DNS通配符和虚拟子域
  • 安全301redirect使用htaccess的两个域名
  • 如何将子文件夹的子域redirect到使用相同子文件夹和子域本身作为参数的域?
  • 非ruby网站上的Ruby错误
  • 将example.com/*redirect到www.example.com/*
  • 创build301redirect不希望工作
  • 破坏.htaccess
  • .htaccess – 如何告诉wordpress忽略一个目录
  • Mod Rewrite – 检查特定目录中的文件
  • htaccess – 如何在服务器和本地机器上处理不同的目录名称?

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