ページを再読み込みしたり URL を直接入力したりすると 404 Not Found になってしまう

事象

ライブラリ方式プロキシ方式 で導入したサイトで、多言語ページを再読み込みしたり、多言語ページの URL を直接入力してアクセスすると、 404 Not Found になってしまう。

原因 1.

導入方式が以下の場合、設定ファイルに必要なルールが追記されていない可能性があります。

解決方法

設定ファイルに、下記のように必要なルールを記述してください。
ご使用の Web サーバーにより異なります。

Web サーバーが Apatch の場合 : .htaccess ファイルに記述する

・Rewrite 方式を使用していない場合
(.htaccess ファイルが存在しない場合はドキュメントルートに新規作成)

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^/?(?:ar|eu|bn|bg|ca|zh-CHS|zh-CHT|da|nl|en|fi|fr|gl|de|el|he|hu|id|it|ja|ko|lv|ms|my|ne|no|fa|pl|pt|ru|es|sw|sv|tl|th|hi|tr|uk|vi)($|/.*$) $1
</IfModule>

・Rewrite 方式を使用している場合

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^/?(?:ar|eu|bn|bg|ca|zh-CHS|zh-CHT|da|nl|en|fi|fr|gl|de|el|he|hu|id|it|ja|ko|lv|ms|my|ne|no|fa|pl|pt|ru|es|sw|sv|tl|th|hi|tr|uk|vi)($|/.*$) $1

  # Don't intercept .cgi files, as they would not execute
  RewriteCond %{THE_REQUEST} .cgi
  RewriteRule .? - [L]

  # Intercept only static content: html and htm urls
  # Warning: do not remove this line or other content could be loaded
  RewriteCond %{REQUEST_URI} /$ [OR]
  RewriteCond %{REQUEST_URI} .(html|htm|shtml|php|php3|phtml)

  # Use the wovn_index.php to handle static pages
  RewriteRule .? wovn_index.php [L]
</IfModule>

Web サーバーが nginx の場合 : nginx 設定ファイルに記述する

server {
  # …

  # php configuration
  location ~ .php$ {
    # …
  }

  location / {
    # …

    # WOVN.php interception ####################################################
    # strip language code off of $uri
    rewrite ^/(ar|eu|bn|bg|ca|zh-CHS|zh-CHT|da|nl|en|fi|fr|gl|de|el|he|hu|id|it|ja|ko|lv|ms|my|ne|no|fa|pl|pt|ru|es|sw|sv|tl|th|hi|tr|uk|vi)(/.*)$ $2;

    # intercept static content with WOVN.php
    if ($uri ~ (/|.(html|htm))$) {
      rewrite .? /wovn_index.php;
    }
  }
}

原因 2.

導入方式が以下の場合、CDN における WOVN Proxy サーバーへの転送設定がされていない可能性があります。

解決方法

CDN における WOVN Proxy サーバーへの転送設定として、/en/ 等の多言語ページを WOVN Proxy サーバーへ転送するように設定してください。




インフォメーション
上記にあてはまらない場合や、上記でも解決しない場合は、WOVN 管理画面右上の「お問い合わせ」ボタンからお問い合わせください。