0

Code Igniter の URL: www.example.com は完全に機能しています。

ここで、ページという名前のルート ドキュメントにフォルダーを作成し、この「ページ」フォルダー内にワードプレスをインストールしました。

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

1 に答える 1

0

友達、

私はこれを自分で修正しました。次のように .htaccess ファイルでリダイレクトを行いました。

RewriteBase /page/

さらに、以前は CI と Wordpress に別々のデータベースを使用していました。データベースを統合しました。

于 2013-09-20T16:12:03.487 に答える