[フレーム]
Last Updated: February 25, 2016
·
1.046K
· moiseevigor

Allow optional trailing slash when using optional parameter

I found this way to achive this with Apache mod_rewrite enabled. Snippet of .htaccess

RewriteEngine On

# remove trailing slash
RewriteCond %{HTTPS} off
RewriteRule ^(.+[^/])/$ http://%{HTTP_HOST}/1ドル [R=301,L]
RewriteCond %{HTTPS} on
RewriteRule ^(.+[^/])/$ https://%{HTTP_HOST}/1ドル [R=301,L]

AltStyle によって変換されたページ (->オリジナル) /