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 ...
随机推荐
- jquery.chosen.js实现模糊搜索
jquery.chosen.js查询时,chosen默认从第一个字符搜索,所以写中间的字符搜索时,是搜索不出来的 若想实现中间字符的模糊查询,下面的js中(search_contains属性为true ...
- Centos 用户组管理
#组帐号管理 linux 组管理 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= 1.组的分类 私用组:只能包含一个用 ...
- Android ScaleAnimation类:尺寸变化动画类
ScaleAnimation类是Android系统中的尺寸变化动画类,用于控制View对象的尺寸变化,该类继承于Animation类. ScaleAnimation类中的很多方法都与Animation ...
- 如何使用通用Mapper
集成方法请看上面的文档,集成后,可以继续阅读本页文档. 1. 继承通用的Mapper<T>,必须指定泛型<T> 例如下面的例子: public interface UserIn ...
- ActiveXObject Word.Application 打印小票
javascript 时间格式 Date.prototype.format = function (format) { var o = { "M+": this.getMonth( ...
- HttpClient Post Form提交文件/二进制数据
HttpClient httpClient = HttpClients.createDefault(); HttpPost httppost = new HttpPost(url); Multipar ...
- NandFlash详述【转】
NandFlash详述 转自:http://wenku.baidu.com/view/04d9330bb52acfc789ebc92f.html?re=view 1. 硬件特性: [Flash的硬件实 ...
- ANSI是什么编码?
用Notepad++创建一个文本文件text.txt,其默认编码格式为ANSI(乍看之下,还以为是ASCII呢),输入汉字居然不是乱码: 保存为test.txt,发送给你美国的同事Bob.他也用Not ...
- VMware虚拟机中的常用文件介绍
虚拟机的文件管理由VMware Workstation来执行.一个虚拟机一般以一系列文件的形式储存在宿主机中,这些文件一般在由workstation为虚拟机所创建的那个目录中. 如下图所示:(< ...
- 《OD大数据实战》Oozie环境搭建
一.Oozie环境搭建 1. 下载oozie-4.0.0-cdh5.3.6.tar.gz 下载地址:http://archive.cloudera.com/cdh5/cdh/5/ 2. 解压 tar ...