简体   繁体   English

在根目录和WordPress子目录中无法安装CodeIgniter

[英]Installing CodeIgniter on root and WordPress in sub-directory Not Working

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. 我在codeIngiter根目录中安装了wordpress,如果我使用wordpress永久链接,则会在wordpress页面上收到codeIgniter的404页面未找到错误。 my .htacess file is as follows. 我的.htacess文件如下。 where I am getting wrong setting? 我在哪里设置错误? .htacess file. .htacess文件。 similar question is Installing CodeIgniter on root and WordPress in sub-directory 类似的问题是在根目录和WordPress的子目录中安装CodeIgniter

# 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 请参阅重写基础,我如何进行了修改,现在您尝试同时访问codeigniter和wordpress url

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM