简体   繁体   中英

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.

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:

`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!

The .htaccess for the main codeigniter site is as follows:

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:

<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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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