※社内専用

シードフォームのアドレスを.htmlにする

/contact.htmlとなっているページにフォームを設置する場合。
被リンクがあるはずなので、ページ名は変更したくない。抜けも怖いし。
そんなとき。

.htaccessでリライトをかける

確認画面等も考慮する必要があるので、以下のように3行必要
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^contact\.html$ contact/index.php [L]
  RewriteRule ^confirm\.html$ contact/confirm.php [L]
  RewriteRule ^submit\.html$ contact/submit.php [L]
</IfModule>

フォームのHTMLを書き換える

送信や戻るボタンが.php表記のままなので、.htmlに変更しよう。

view/form.php

13行目
<form method="post" action="confirm.html" class="inquiry h-adr">

view/confirm.php

7行目
<form method="post" action="submit.html" class="inquiry h-adr">
33行目
<button type="button" class="button cancel" onclick="location.href='./contact.html<?= '?PHPSSID='.session_id(); ?>';">修正する</button>

完成品

http://www.jishinkai.jp/contact.html