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 ...
随机推荐
- JLink and JTAG等接口简介
1.JTAG JTAG用的计算机的并口,JTAG也是一种国际标准测试协议(IEEE 1149.1兼容),主要用于芯片内部测试.现在多数的高级器件都支持JTAG协议,如DSP.FPGA器件等. 标准的J ...
- Java科普之算法剖析
本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 从小白晋升,一路走来:从helloworld,到JFrame,再到Android:从城外小子,到内城 ...
- ThreadLocal实现session中用户信息 的线程间共享(精)
ThreadLocal并不难理解,我总结的最简单的理解就是: ThreadLocal像其它变量一样(局部.全局.静态)也是一种变量类型,只是他是线程变量,更直白的说他是一种变量作用域,即他的作用域是当 ...
- 293. Flip Game
题目: You are playing the following Flip Game with your friend: Given a string that contains only thes ...
- logstash_agent.conf 语法注意事项
编写配置文件时要注意语法,如新版本的logstash对参数host变更为hosts,去除了port参数等. [root@localhost logstash]# cat logstash_agent. ...
- chrome开发配置(四)生成项目及配置库引用
1.运行gclient runhooks --force .会重新下载个python 2.7版本的,并且下载好几个文件,大概1个多小时:
- 2、Spring的LocalSessionFactoryBean创建过程源码分析
spring的LocalSessionFactoryBean生成过程与hibernate的SessionFactory生成过程是高度吻合的. 为了后面源码分析,首先讲解一个接口,一个类的功能:①.接口 ...
- spring路径通配符
在应用Spring的工程中,使用class path的方式加载配置文件应该是最常用的做法,然而对大部分人来说,刚开始使用Spring时,几乎都碰到过加载配置文件失败的情况,除了配置上的错误外,很多时候 ...
- 深入浅出:Linux设备驱动之字符设备驱
一.linux系统将设备分为3类:字符设备.块设备.网络设备.使用驱动程序: 字符设备:是指只能一个字节一个字节读写的设备,不能随机读取设备内存中的某一数据,读取数据需要按照先后数据.字符设备是面向流 ...
- OpenJDK和OracleJDK的JVM性能有多大差距
首先要先明确OpenJDK和Sun/OracleJDK之间,以及OpenJDK 6.OpenJDK 7.OpenJDK 7u和OpenJDK 8等项目之间是什么关系,这有助于确定接下来编译要使用的JD ...