我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

无法使用htaccess重定向到子域

I am trying to access: http://www.domain.mobi/aff_admin with a subdomain something like that: http://aff_admin.domain.mobi

but for some reason I'm unable to make it work. I was trying this following code:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.mobi
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ([a-z0-9-]+)/? http://$1.domain.mobi [R=301,NC,L]

Any Idea why its not working? Im running my website on a Amazon server.

近期文章

  • 在twilio上使用url属性后,我需要回到调用者的角度
  • cURL保存文件并重命名?
  • php cUrl错误初始化错误
  • Laravel和数据库设计
  • 回显数组中的每个图像
  • 用于IPN的PHP自定义变量
  • Ajax PHP更新无法正常工作
  • joomla 2.5.9中的Jomsocial错误
  • 在iPhoneSDK中删除指定HTML标签
  • 使用PHP计算MongoDB中的速度太慢
  • 一页网站联系表单问题
  • 在网站上创建实时聊天框
  • 将CakePhp项目移动到FTP服务器
  • Zend Studio Android原生应用程序
  • Java和PHP的数据库读取问题
  • 使用给定键将对象添加到数组
  • 如何使用curl rest和php登录解析?
  • PHP抓取内容功能,在meta标签内?
  • 在刷新时生成新的目录字符串
  • 在非简单情况下处理MySQL存储过程中的并发性

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华