404错误:在Wordpress的子文件夹中访问PHP应用程序

I have wordpress installed in the root folder for my domain. This is my main website. Now i want to install a CodeIgnitor PHP application in a subfolder (it has nothing to do with wordpress, it just has to be in the same domain) so domain.com/folder/

I however get a 404 error in wordpress.

If I type domain/folder/index.php/login -> it takes me to the login page atleast - but i still cant go beyond.

Please help.

THis is my current .htaccess

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

# END WordPress

Try this

  1. Login wp-admin
  2. Go Settings → Permalinks
  3. Update to post name

Those rewriteconds in WordPress' section of your .htaccess will ensure that any URL that isn't an actual file or directory will be handled by WP, so your CI never gets a chance to see it. Changing the rewrite rule as follows will exclude your subdir from WP's override.

RewriteRule ^(?!folder(?:$|/)). /index.php [L]

That's a negative look-ahead assertion which ensures That CI will get the URL if the path is only /folder, or is or begins with /folder/. You need both cases so Apache can do its normal handling of directory URLs.