Drupal的URL重写冲突 [英] Drupal URL Rewriting conflict

查看:132
本文介绍了Drupal的URL重写冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Drupal 7安装在我的网站的根目录下。 .htaccess文件尚未安装后修改。

I have Drupal 7 installed in the root directory of my site. The .htaccess file hasn't been modified since installation.

不过,我也有codeIgniter设立在一个子目录中。我创建了与建议的说明CI目录中的.htaccess文件来从URL中移除的index.php。

However, I also have CodeIgniter set up in a subdirectory. I created a .htaccess file in the CI directory with the suggested instructions to remove index.php from the url.

如。 mysite.com/subsite/index.php/blog - > mysite.com/subsite/blog

eg. mysite.com/subsite/index.php/blog --> mysite.com/subsite/blog

RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

不幸的是不起作用。我认为Drupal的的.htaccess规则是相互矛盾的。我应该写什么规则Drupal的的.htaccess,使codeIgniter重写规则?

Unfortunately doesn't work. I assume Drupal's .htaccess rules are conflicting. What rules should I write Drupal's .htaccess to enable the CodeIgniter rewriting rules?

感谢

修改:解决办法是,在后,立即对的RewriteEngine叙述在Drupal的htaccess的规则,我插入

EDIT: Solution is, immediately after the RewriteEngine on rule in Drupal's .htaccess, I inserted

RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^ci_site/(.*)$ ci_site/index.php/$1 [L]

希望这有助于任何人谁也有类似的设置。

Hopefully this helps anyone who has a similar setup.

推荐答案

从复制的问题。我降落在这里想帮助别人,并阅读的问题后,我看到里面的解决方案......

Copy from the question. I landed here wanting to help somebody and, after reading the question, I saw the solution inside...

解决的办法是,在Drupal的的.htaccess的规则RewriteEngine叙述后,立即插入

The solution is, immediately after the RewriteEngine on rule in Drupal's .htaccess, inserting

RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^ci_site/(.*)$ ci_site/index.php/$1 [L]

这篇关于Drupal的URL重写冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆