セッションや共用SSLの問題を考えずに、普通にリンクを貼るのであれば、Zencartのデフォルトで設定されているURL(http://domain_name.com/index.php?main_page=contact_us など)をそのままテンプレート内に張り付けることで動作しますが、この方法でリンクを貼るとクッキーの使えないブラウザで正常にセッションが動作しなくなります。Zencartのセッションについてはこちらの記事で触れています。
セッションを維持するリンクの貼り方は状況によっていくつか考えられるので、順に説明していきたいと思います。
…
.htaccessに以下を記述してルートに設置
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /
# Rewrite URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
参考:http://eru-net.jp/web/?itemid=58
この投稿へのコメント
コメントはまだありません。