根和Word preSS在次目录中安装codeIgniter不工作 [英] Installing CodeIgniter on root and WordPress in sub-directory Not Working

查看:101
本文介绍了根和Word preSS在次目录中安装codeIgniter不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Word preSS在codeIngiter根目录下,如果我用一句话preSS的永久链接,然后我得到codeIgniter的404页上的字preSS页找不到错误。 我.htacess文件如下。在那里我得到错误的设置? .htacess文件。类似的问题是<一个href="http://stackoverflow.com/questions/2510457/installing-$c$cigniter-on-root-and-word$p$pss-in-sub-directory">Installing codeIgniter根和Word preSS的子目录

 #打开URL重写
RewriteEngine叙述上
的RewriteBase /

#被查看保护应用程序和系统文件的index.php文件丢失时
的RewriteCond $ l ^(应用|系统|民营|日志)

#重写到的index.php / ACCESS_DENIED / URL
重写规则^(。*)$的index.php / ACCESS_DENIED / $ 1 [PT,L]

#重写到index.php文件/ URL
的RewriteCond%{REQUEST_URI} ^ \(JS | CSS | GIF | PNG | JPG | JPEG | BMP |瑞士法郎| TXT | XML | HTC | PDF | XLS | DOC | ICO)!(+)。$

#删除index.php文件
#参考。 HTTP://www.$c$cigniter.com/userguide3/general/urls.html

的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则^(。*)$的index.php / $ 1 [L]

#允许这些目录和文件直接显示:
的RewriteCond $ l ^(指数\ .PHP |机器人\ .TXT |博客| OpenSearch的\的.xml |图标\ .ICO)!
重写规则^(。*)$的index.php / $ 1 [L]
 

解决方案

 类似。

的DirectoryIndex index.php文件
#BEGIN字preSS
&LT; IfModule mod_rewrite.c&GT;
RewriteEngine叙述上
的RewriteBase /博客/
重写规则^指数\ .PHP $  -  [L]
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则。的index.php [L]
&LT; / IfModule&GT;
#结束字preSS
 

看重写基地如何我已经修改了,你现在尝试访问这两个codeigniter和字preSS网址

I installed wordpress in codeIngiter root directory, If I use wordpress permalinks then I am getting codeIgniter's 404 page not found error on wordpress pages. my .htacess file is as follows. where I am getting wrong setting? .htacess file. similar question is Installing CodeIgniter on root and WordPress in sub-directory

# Turn on URL rewriting
RewriteEngine On
RewriteBase /

# Protect application and system files from being viewed when the index.php is missing
RewriteCond $1 ^(application|system|private|logs)

# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]

# Rewrite to index.php/URL
RewriteCond %{REQUEST_URI} !^(.+)\.(js|css|gif|png|jpg|jpeg|bmp|swf|txt|xml|htc|pdf|xls|doc|ico)$

# Remove the index.php file
# Ref. http://www.codeigniter.com/userguide3/general/urls.html

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

# Allow these directories and files to be displayed directly:
RewriteCond $1 !^(index\.php|robots\.txt|blog|opensearch\.xml|favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [L]

解决方案

something like.

DirectoryIndex index.php
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

see rewrite base how i have modified, and you now try to access both codeigniter and wordpress url

这篇关于根和Word preSS在次目录中安装codeIgniter不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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