2

Web サイトhttp://www.example.com/は CMS で実行され、.htaccess で設定されたルールによってすべてが通過します。http://www.example.com/にアクセスすると、ユーザーの言語設定に応じて、ユーザーは次のいずれかのパスにリダイレクトされます。

http://www.example.com/en/
http://www.example.com/fr/

/en/および/fr/ディレクトリは実際には存在しません。これらは CMS によって処理されます。

サイトに新しいセクション ( ) を追加してinvestors/いますが、今のところ CMS を通過させたくありませんが、ユーザーに気付かれたくありません。

元の .htaccess ファイルには次の行があります。

# never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# rewrite everything else to index.php
RewriteRule .* index.php [L]

/en/investors/要求されたパスがorで始まる場合、CMS を経由しないようにしました/fr/investors/

# never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# rewrite everything else to index.php
# except investors' section
RewriteRule ^(?!\/en\/investors|\/fr\/investors).+ index.php [L]

/en/investors/ディレクトリとディレクトリをサーバーにアップロードしましたが、正常に動作しますが、ディレクトリとディレクトリが存在する/fr/investors/ため、ホームページが壊れています。そのルールに例外を追加するにはどうすればよいですか?/en//fr/

4

1 に答える 1