/checkoutという特定のサブフォルダーにmodre-writeしようとしていますが、これにはhttps用のSSL証明書が添付されています
だから私は私のサイトのルートフォルダにこれを持っています-
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
# in http: force secure.html to https
RewriteCond %{server_port} !=443
RewriteCond $1 ^([^/]+)$ [NC]
# this kinda works below but is resolving to index2.php and is showing in the url so not really working yet
RewriteRule checkout/([^/]+)\.html$ https://mysite.com/checkout/index2.php [L]
それを除いて
https://mysite.com/checkout/index.html
それが示している
https://mysite.com/checkout/index2.php
(index2.phpはテストURLです)
また、サブフォルダの.htaccessを次のように修正してみました
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{server_port} !=443
RewriteCond $1 ^([^/]+)$ [NC]
RewriteRule ^([^/\.]+)/?$ https://mysite.com/checkout/index2.php [L]
処理したいだけです
https://mysite.com/checkout/index.html
またはhttps://mysite.com/checkout/about-us.html
同じように私はこのようにルートにいます
https://mysite.com/index.html
=> https://mysite.com/index.php
(そして変数などを取得します)
すなわち
RewriteRule ^/?(catalogue-page)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+) index2.php?friendly_url=$1&catalogue_id=$2&view=catalogue&categoryid=$3&subcategoryid=$4&subjectid=$5&item=$6
httpsはもっと複雑だと思います。ポインタ/ヘルプなどは大歓迎です