Solution multisite htaccess cleanURL
My solution to getting Clean URL working with my multisite setup drupal 4.7
I added Alias to my httpd.conf apache file:
<VirtualHost *:80>
# Alias for all php drupal sites
Alias /abc /var/www/html/drupal
Alias /def /var/www/html/drupal
Alias /xyz /var/www/html/drupal
</VirtualHost>
My setup has 4 sites /drupal, /abc, /def, /xyz all files are in the /drupal directory
- url=/drupal (sites/default/)
- url=/abc (sites/localhost.abc/)
- url=/def (sites/localhost.def/)
- url=/xyz (sites/localhost.xyz/)
In the /drupal/.htacess file. I added a RewriteCond %{REQUEST_URI} condition for
each site, and so have separate RewriteRule for each site.
No need for the RewriteBase directive, leave it commented out:
#RewriteBase /drupal DO NOT NEED THIS, COMMENT OUT
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/drupal/(.*)$
RewriteRule ^(.*)$ /drupal/index.php?q=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/abc/(.*)$
RewriteRule ^(.*)$ /abc/index.php?q=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/def/(.*)$
RewriteRule ^(.*)$ /def/index.php?q=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/xyz/(.*)$
RewriteRule ^(.*)$ /xyz/index.php?q=$1 [L,QSA]
Note: each site has its own database aswell as files, modules and themes directories in the corresponding sites/localhost.site/ directory.
Solution multisite htaccess cleanURL的更多相关文章
- httpd.conf .htaccess apache 服务器配置
PHP Advanced and Object-Oriented Programming Larry Ullman The standard solution in these situations ...
- Enterprise Solution 3.1 企业应用开发框架 .NET ERP/CRM/MIS 开发框架,C/S架构,SQL Server + ORM(LLBL Gen Pro) + Infragistics WinForms
行业:基于数据库的制造行业管理软件,包含ERP.MRP.CRM.MIS.MES等企业管理软件 数据库平台:SQL Server 2005或以上 系统架构:C/S 开发技术 序号 领域 技术 1 数据库 ...
- Enterprise Solution 开源项目资源汇总 Visual Studio Online 源代码托管 企业管理软件开发框架
Enterprise Solution 是一套管理软件开发框架,在这个框架基础上开发出一套企业资源计划系统Enterprise Edition. 现将Enterprise Solution开发过程中遇 ...
- Windows 10 部署Enterprise Solution 5.5
Windows 10正式版发布以后,新操作系统带来了许多的变化.现在新购买的电脑安装的系统应该是Windows 10.与当初用户不习惯Windows 7,购买新电脑后第一个想做的事情就是重装成XP,估 ...
- Enterprise Solution 企业资源计划管理软件 C/S架构,支持64位系统,企业全面应用集成,制造业信息化
Enterprise Solution是一套完整的企业资源计划系统,功能符合众多制造业客户要求.系统以.NET Framework技术作为开发架构,完善的功能可有效地帮助企业进行运营策划,减低成本,如 ...
- Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php
需要开启Apache2的rewrite模块 1.打开/etc/apache2/apache2.conf 将文件中的AllowOverride None改为AllowOverride All 2.修改m ...
- Dynamics CRM 2015-超大Solution导入问题
我们在将比较大的solution导入CRM的时候,经常会遇到超时的问题,这是因为CRM的本身的优化限制导致的,那么如何解决呢? 官方已经有了解决方案了. 在浏览完两种解决方法之后,我们要知道的是: 1 ...
- .htaccess添加Header set Cache-Control报错500
在优化网站开启站点的图片缓存时,需要在.htaccess文件中加入: #文件缓存时间配置10分钟 <FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf ...
- apache下htaccess不起作用,linux,windows详解
可能出现下面这三种的错误可能性: 第一种:启用 rewrite 和 .htaccess 设置 rewrite设置:找到apache的配置文件httpd.conf文件,找到:#LoadModule re ...
随机推荐
- Zn离子参数
Generating Topology and Coordinates Files Using xLeap (AmberTools V1.5) Parameter and example files: ...
- SGU 106 The equation 扩展欧几里得好题
扩展欧几里得的应用……见算法竞赛入门经典p.179 注意两点:1.解不等式的时候除负数变号 2.各种特殊情况的判断( a=0 && b=0 && c=0 ) ( a=0 ...
- Sails 自定义 model 方法
Sails 自定义 model 方法 在 Sails 中 model 提供了一些原生的静态方法,如 .create(), .update(), .destroy(), .find(), 等. 在实际业 ...
- POJ 1743 Musical Theme(后缀数组)
题意:有n个数值,算出相邻两个值的差值,此时有n-1个值的序列,把这序列当做字符串的话,求最长重复子串,且这两个子串不能重叠. 分析:后缀数组解决.先二分答案,把题目变成判定性问题:判断是否存在两个长 ...
- C# 读取指定URL的内容
#region 读取指定URL的内容 /// <summary> /// 读取指定URL的内容 /// </summary> /// <param name=" ...
- 手机上的频段GSM GPRS分别是什么
GSM是一种第二代无线通信的网络制式标准,GPRS是GSM应用的一种数据业务(如上网).频段:上行:890-915MHz(中国移动:890-909,中国联通:909-915)下行:935-960MHz ...
- ZOJ Problem Set - 3804 YY's Minions
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5336 比较简单的模拟题,题意也很好理解. #include <iostr ...
- iOS 8 AutoLayOut入门
http://blog.csdn.net/asdfg13697116596/article/details/42562565 iOS 8 AutoLayOut入门自从iOS6带来Auto Layout ...
- Asp.Net验证码1
验证码html调用 验证码:<input name="> <img src="CodeHandler.ashx" id="imgCode&qu ...
- 转:整理一下Entity Framework的查询
Entity Framework是个好东西,虽然没有Hibernate功能强大,但使用更简便.今天整理一下常见SQL如何用EF来表达,Func形式和Linq形式都会列出来(本人更喜欢Func形式). ...