我有一个 Code Igniter URL:www.example.com,它运行良好。
现在我在名为 pages 的根文档中创建了一个文件夹,并在这个“pages”文件夹中安装了 wordpress。
我期待当我访问www.example.com/pages时,我会得到 wordpress 页面,但是当我打开 www.example.com/pages 时,它会自动重定向到http://www.example.com/login
因此我无法查看我的 wordpress 页面。
我尝试过的:我将 .htaccess 文件更改为重定向,但它没有用。我还检查了 wordpress 的数据库,但没有找到任何东西。默认站点(Code Igniter)与 Wordpress 有不同的数据库。
我位于 www.example.com 的 .htaccess 文件是这样的:
<IfModule mod_rewrite.c>
# Turn on URL rewriting
RewriteEngine On
# If your website begins from a folder e.g localhost/my_project then
# you have to change it to: RewriteBase /my_project/
# If your site begins from the root e.g. example.local/ then
# let it as it is
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]
# Allow these directories and files to be displayed directly:
RewriteCond $1 ^(index\.php|robots\.txt|favicon\.ico|public|assets|css|js|images|pma \.php|uploads|assets)
# No rewriting
RewriteRule ^(.*)$ - [PT,L]
# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
</IfModule>