简体   繁体   English

403带有codeigniter的子目录中的禁止wordpress

[英]403 Forbidden wordpress in subdirectory with codeigniter

I am having a rather annoying issue with running a wordpress blog site from a within subdirectory of a codeigniter application. 我在从codeigniter应用程序的子目录中运行wordpress博客站点时遇到一个非常烦人的问题。

The main codeigniter site works fine as it always has, and I have now tried to add a wordpress blog that sits in a subdirectory in the root of this in a folder called 'blog' but when I try to get to the URL: 主要的codeigniter网站可以像往常一样正常运行,现在我尝试在位于“ blog”文件夹的根目录的子目录中添加一个wordpress博客,但是当我尝试访问URL时:

`http://sociavise.co.uk/blog`

A 403 forbidden is shown - but then refreshing the page allows the page to be viewed..I'm not quite sure what's going on and iv'e tried many different configurations found within the pages of this site to no avail! 显示了403禁止-但刷新页面后即可查看该页面。.我不太确定发生了什么,并且尝试了此网站页面中的许多不同配置,均无济于事!

The .htaccess for the main codeigniter site is as follows: 主要codeigniter站点的.htaccess如下:

DirectoryIndex index.php
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/blog/.*$
RewriteCond %{HTTP_HOST} ^203\.0\.113\.0
RewriteRule (.*) "http\:\/\/example\.co.uk\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.example\.co.uk$
RewriteRule ^/?$ "http\:\/\/example\.co.uk\/" [R=301,L]
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico|blog)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots
Deny from env=block_bad_bots

And the wordpress .htaccess is as below: 单词.htaccess如下:

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

Im hoping somone can point me in the right direction. 我希望有人能指出我正确的方向。

Many thanks in advance, Jamie. 杰米,在此先感谢。

an unknown filter was not added: DEFLATE

打开httpd.conf并在LoadModule deflate_module modules / mod_deflate.so行之前删除#。重新启动apache。

The issue suddenly occurred on the new directory. 该问题突然出现在新目录上。 I disabled caching and the error went away, I will try and re-enable soon and see if it comes back again. 我禁用了缓存,错误消失了,我将尝试并重新启用它,看看是否再次出现。 Strange! 奇怪!

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

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